Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java @ 2250:40608c82e9cb
Bugfix: create a report facet for historical discharge curves even if no data has been computed.
flys-artifacts/trunk@3899 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 03 Feb 2012 13:46:03 +0000 |
parents | 7335c526befd |
children | ea173e4c07c7 |
comparison
equal
deleted
inserted
replaced
2249:997df76c6f58 | 2250:40608c82e9cb |
---|---|
64 | 64 |
65 if (facets == null) { | 65 if (facets == null) { |
66 return res; | 66 return res; |
67 } | 67 } |
68 | 68 |
69 if (res.getReport().hasProblems()) { | |
70 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); | |
71 } | |
72 | |
69 WQTimerange[] data = (WQTimerange[]) res.getData(); | 73 WQTimerange[] data = (WQTimerange[]) res.getData(); |
70 if (data == null || data.length == 0) { | 74 if (data == null || data.length == 0) { |
71 logger.warn("Historical Discharge calculation has no results!"); | 75 logger.warn("Historical Discharge calculation has no results!"); |
72 return res; | 76 return res; |
73 } | 77 } |
74 | 78 |
75 prepareFacets(facets, data); | 79 prepareFacets(facets, data); |
76 | |
77 if (res.getReport().hasProblems()) { | |
78 facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id)); | |
79 } | |
80 | 80 |
81 return res; | 81 return res; |
82 } | 82 } |
83 | 83 |
84 | 84 |