[Mpuls-commits] r6049 - base/trunk/mpulsweb/lib

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 24 14:23:27 CEST 2012


Author: torsten
Date: 2012-08-24 14:23:27 +0200 (Fri, 24 Aug 2012)
New Revision: 6049

Modified:
   base/trunk/mpulsweb/lib/dialogs.py
Log:
Fixed decorator to check if the case is linked with a meta-case.


Modified: base/trunk/mpulsweb/lib/dialogs.py
===================================================================
--- base/trunk/mpulsweb/lib/dialogs.py	2012-08-24 11:51:52 UTC (rev 6048)
+++ base/trunk/mpulsweb/lib/dialogs.py	2012-08-24 12:23:27 UTC (rev 6049)
@@ -137,14 +137,13 @@
             # Only check if there is a "Syncpermission" if the Privacy
             # statement is set and the meta-serber is enabled. None if it is
             # not either signed or declined
-            if (statement.isSigned() 
-                and meta.is_sync_allowed() is not None
-                and meta.is_linked()
-                or (confirmed == 1)):
-                return func(self, *args, **kwargs)
-            else:
-                c.ds_id = case_id
-                return render('/privacy/dialogs/missing_caselink.mako')
+            if statement.isSigned() \
+            and meta.is_sync_allowed():
+                if not meta.is_linked() and not (confirmed == 1):
+                    c.ds_id = case_id
+                    return render('/privacy/dialogs/missing_caselink.mako')
+
+            return func(self, *args, **kwargs)
         except:
             log.exception('Fehler in der Validierung')
             raise



More information about the Mpuls-commits mailing list