changeset 1160:5d2c68a4c344

Do not export empty 'deskriptoren' in json exporter.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 08 Nov 2016 17:46:06 +0100
parents 67fff2a4437e
children ea6b062e5305 315df94c679b
files src/main/java/de/intevation/lada/exporter/json/JsonExporter.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/exporter/json/JsonExporter.java	Tue Nov 08 17:45:27 2016 +0100
+++ b/src/main/java/de/intevation/lada/exporter/json/JsonExporter.java	Tue Nov 08 17:46:06 2016 +0100
@@ -240,6 +240,9 @@
     private void addDeskriptoren(JsonNode probe) {
         String desk = probe.get("mediaDesk").asText();
         String[] parts = desk.split(" ");
+        if (parts.length <= 1) {
+            return;
+        }
 
         QueryBuilder<Deskriptoren> builder = new QueryBuilder<Deskriptoren>(
                 repository.entityManager("stamm"),
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)