changeset 794:1473f641ec29

Fixed 'statusfolge' validator.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 19 Nov 2015 08:49:44 +0100
parents fd720cadfdb6
children c20b12007a35
files src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java	Thu Nov 19 08:48:53 2015 +0100
+++ b/src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java	Thu Nov 19 08:49:44 2015 +0100
@@ -60,6 +60,9 @@
         lastFilter.orderBy("datum", true);
         List<LStatusProtokoll> protos =
             repository.filterPlain(lastFilter.getQuery(), "land");
+        if (protos.isEmpty()) {
+            return null;
+        }
         LStatusProtokoll last = protos.get(protos.size() - 1);
         QueryBuilder<StatusKombi> kombi2 = kombi.getEmptyBuilder();
         kombi2.and("stufeId", last.getStatusStufe());
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)