[Lada-commits] [PATCH 1 of 2] Use lock mechanism for messung objects on status POST

Wald Commits scm-commit at wald.intevation.org
Fri Feb 12 12:10:00 CET 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1455206834 -3600
# Node ID 501ccddaeacae993db2a1a1ad7a9aea82a82a02e
# Parent  9c5a5afb6708df0636c3eb04a9f77430a25f4923
Use lock mechanism for messung objects on status POST.

diff -r 9c5a5afb6708 -r 501ccddaeaca src/main/java/de/intevation/lada/rest/StatusService.java
--- a/src/main/java/de/intevation/lada/rest/StatusService.java	Thu Feb 11 12:28:21 2016 +0100
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java	Thu Feb 11 17:07:14 2016 +0100
@@ -226,6 +226,9 @@
         UserInfo userInfo = authorization.getInfo(request);
         LMessung messung = defaultRepo.getByIdPlain(
             LMessung.class, status.getMessungsId(), "land");
+        if (lock.isLocked(messung)) {
+            return new Response(false, 697, null);
+        }
         boolean next = false;
         boolean change = false;
         if (messung.getStatus() == null) {


More information about the Lada-commits mailing list