changeset 1229:1965e26ef8b5

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.
author Tom Gottfried <tom@intevation.de>
date Fri, 09 Dec 2016 17:15:21 +0100
parents 22d2123e1d2a
children f48be4a5c6a0
files src/main/java/de/intevation/lada/importer/laf/LafObjectMapper.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)