changeset 947:0a80f4a87c67

statusStufe should be governed by the server only.
author Tom Gottfried <tom@intevation.de>
date Wed, 18 May 2016 18:21:33 +0200
parents 84dd8d597e61
children c9b84bca3e3d
files src/main/java/de/intevation/lada/rest/StatusService.java
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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");
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)