[Dive4elements-commits] [PATCH 01 of 13] Only put current Km to the context if it is a valid km

Wald Commits scm-commit at wald.intevation.org
Wed Nov 7 15:58:35 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1352213503 -3600
# Node ID dd8a63002fb82aabf1afcbfe0ea26f51f9e1596c
# Parent  9fca4d60fb7c318d08a353022bc30761e8761dcc
Only put current Km to the context if it is a valid km

Don't set the current km to the invalid value.

diff -r 9fca4d60fb7c -r dd8a63002fb8 flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixChartGenerator.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixChartGenerator.java	Wed Nov 07 13:49:32 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixChartGenerator.java	Tue Nov 06 15:51:43 2012 +0100
@@ -34,7 +34,9 @@
             logger.debug("currentKm = " + currentKm);
         }
 
-        context.putContextValue(CURRENT_KM, currentKm);
+        if (currentKm != INVALID_KM) {
+            context.putContextValue(CURRENT_KM, currentKm);
+        }
     }
 
     public static final Double getCurrentKmFromRequest(Document request) {


More information about the Dive4elements-commits mailing list