[Lada-commits] [PATCH] Report errors in importing Ort as warning

Wald Commits scm-commit at wald.intevation.org
Fri Dec 9 17:15:29 CET 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1481300121 -3600
# Node ID 1965e26ef8b5105b5d9c9baededa9e6595f4bad0
# Parent  22d2123e1d2ac620451b12d7fc0a5bd3201cf4c8
Report errors in importing Ort as warning.

Failing to import an Ort object does not mean the Probe object will
not be imported, thus only a warning.

diff -r 22d2123e1d2a -r 1965e26ef8b5 src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java
--- a/src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java	Fri Dec 09 16:55:32 2016 +0100
+++ b/src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java	Fri Dec 09 17:15:21 2016 +0100
@@ -854,7 +854,8 @@
             for (Entry<String, List<Integer>> err :
                      violation.getErrors().entrySet()) {
                 for (Integer code : err.getValue()) {
-                    currentErrors.add(
+                    // Add to warnings because Probe object might be imported
+                    currentWarnings.add(
                         new ReportItem("validation", err.getKey(), code));
                 }
             }
@@ -867,7 +868,8 @@
             ortFactory.findVerwaltungseinheit(ort);
         }
         if (ortFactory.hasErrors()) {
-            currentErrors.addAll(ortFactory.getErrors());
+            // Add to warnings because Probe object might be imported
+            currentWarnings.addAll(ortFactory.getErrors());
             return null;
         }
 


More information about the Lada-commits mailing list