[Lada-commits] [PATCH] statusStufe should be governed by the server only
Wald Commits
scm-commit at wald.intevation.org
Wed May 18 18:21:49 CEST 2016
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1463588493 -7200
# Node ID 0a80f4a87c6703bb57a432c2f9b0ead96d75a900
# Parent 84dd8d597e612700bb10b736e8a16a69b0441b5d
statusStufe should be governed by the server only.
diff -r 84dd8d597e61 -r 0a80f4a87c67 src/main/java/de/intevation/lada/rest/StatusService.java
--- a/src/main/java/de/intevation/lada/rest/StatusService.java Wed May 18 14:14:29 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java Wed May 18 18:21:33 2016 +0200
@@ -428,12 +428,7 @@
statusNew.setDatum(new Timestamp(new Date().getTime()));
statusNew.setErzeuger(status.getErzeuger());
statusNew.setMessungsId(status.getMessungsId());
- if (status.getStatusStufe() == null) {
- statusNew.setStatusStufe(currentStatus.getStatusStufe());
- }
- else {
- statusNew.setStatusStufe(status.getStatusStufe());
- }
+ statusNew.setStatusStufe(currentStatus.getStatusStufe());
statusNew.setStatusWert(8);
statusNew.setText("Reset");
@@ -457,7 +452,7 @@
defaultRepo.entityManager("land"),
LStatusProtokoll.class);
lastFilter.and("messungsId", status.getMessungsId());
- lastFilter.and("statusStufe", status.getStatusStufe() - 1);
+ lastFilter.and("statusStufe", currentStatus.getStatusStufe() - 1);
lastFilter.orderBy("datum", true);
List<LStatusProtokoll> proto =
defaultRepo.filterPlain(lastFilter.getQuery(), "land");
More information about the Lada-commits
mailing list