[Mpuls-commits] r2484 - wasko/branches/2.0/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Apr 22 14:59:18 CEST 2010


Author: torsten
Date: 2010-04-22 14:59:17 +0200 (Thu, 22 Apr 2010)
New Revision: 2484

Modified:
   wasko/branches/2.0/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.check_consistence): Added param to
	ignore start and endphase check (needed to decline a case)



Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py	2010-04-22 12:55:31 UTC (rev 2483)
+++ wasko/branches/2.0/mpulsweb/model/case.py	2010-04-22 12:59:17 UTC (rev 2484)
@@ -665,7 +665,7 @@
         """
         self.get_phaseslist().check_consistence(fields)
 
-    def check_anonymizeability(self, fields=None):
+    def check_anonymizeability(self, fields=None, only_on_endphase=True):
         """Raises ConsistenceCheckException if the case is not in a
         anonymizable state.
         """
@@ -678,10 +678,10 @@
                                             % desc))
 
         #Check consistence
-        fields = []
         self.check_consistence(fields)
+
         # Check if the current phase is currently running.
-        if isinstance(phasepart, StartPhasePart):
+        if isinstance(phasepart, StartPhasePart) and only_on_endphase:
             raise ConsistenceCheckException(h.literal(MARKANONYMIZE_FAILED_RUNNING_PHASE
                                             % desc))
 



More information about the Mpuls-commits mailing list