[Lada-commits] [PATCH 2 of 4] Fixed 'statusfolge' validator

Wald Commits scm-commit at wald.intevation.org
Thu Nov 19 08:50:42 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1447919384 -3600
# Node ID 1473f641ec29584288243cc17289502343ab6286
# Parent  fd720cadfdb674d05b50dc171c6458a6fdabcffa
Fixed 'statusfolge' validator.

diff -r fd720cadfdb6 -r 1473f641ec29 src/main/java/de/intevation/lada/validation/rules/status/StatusFolge.java
--- 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());


More information about the Lada-commits mailing list