[PATCH 1 of 2] Fixup rev. c088f7a5797d

Wald Commits scm-commit at wald.intevation.org
Fri Nov 11 18:14:41 CET 2022


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1668183775 -3600
#      Fri Nov 11 17:22:55 2022 +0100
# Branch 3.2.x
# Node ID d5d250ad3c785d58dd3370add5e6514653d8a2ac
# Parent  c088f7a5797d961df36f2c953d05145ed713c640
Fixup rev. c088f7a5797d

diff -r c088f7a5797d -r d5d250ad3c78 artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java
--- 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);
                 }
             }
         }


More information about the Dive4Elements-commits mailing list