changeset 9762:d5d250ad3c78 3.2.x

Fixup rev. c088f7a5797d
author Tom Gottfried <tom@intevation.de>
date Fri, 11 Nov 2022 17:22:55 +0100
parents c088f7a5797d
children ce7c67445cbb
files artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Thu Nov 10 18:16:25 2022 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Fri Nov 11 17:22:55 2022 +0100
@@ -622,25 +622,23 @@
         D4EArtifact flys = (D4EArtifact) master;
         String colDesc = "";
 
+        Double value = wqkms.getRawValue();
+
         if (flys instanceof WINFOArtifact && isQ) {
             colDesc = getCSVRowTitle((WINFOArtifact)flys, wqkms);
         }
         else if (!isQ) {
-            Double value = RiverUtils.getValueFromWQ(wqkms);
             colDesc = (value != null) ?
                 Formatter.getWaterlevelW(context).format(value) : null;
         }
 
         if (flys instanceof WINFOArtifact) {
-            if (wqkms != null && wqkms.getRawValue() != null) {
+            if (wqkms != null && value != null) {
                 WINFOArtifact winfo = (WINFOArtifact) flys;
-                colDesc = RiverUtils.getNamedMainValue(
-                    winfo, wqkms.getRawValue());
+                colDesc = RiverUtils.getNamedMainValue(winfo, value);
                 // For 'W am Pegel' s
                 if (colDesc == null) {
-                    Double value = wqkms.getRawValue();
-                    colDesc = (value != null) ?
-                        Formatter.getWaterlevelW(context).format(value) : null;
+                    colDesc = Formatter.getWaterlevelW(context).format(value);
                 }
             }
         }

http://dive4elements.wald.intevation.org