[Lada-commits] [PATCH 2 of 2] Do not export empty 'deskriptoren' in json exporter

Wald Commits scm-commit at wald.intevation.org
Tue Nov 8 17:46:11 CET 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1478623566 -3600
# Node ID 5d2c68a4c344eb8bdcddd8a90a3b8d886186acae
# Parent  67fff2a4437e0b57691727ab80cd86d7230efeb2
Do not export empty 'deskriptoren' in json exporter.

diff -r 67fff2a4437e -r 5d2c68a4c344 src/main/java/de/intevation/lada/exporter/json/JsonExporter.java
--- 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"),


More information about the Lada-commits mailing list