[Mpuls-commits] r598 - wasko/branches/1.0/waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 8 15:45:36 CEST 2009


Author: torsten
Date: 2009-09-08 15:45:35 +0200 (Tue, 08 Sep 2009)
New Revision: 598

Modified:
   wasko/branches/1.0/waskaweb/controllers/case.py
Log:
Added check that phase is finished on anonymization


Modified: wasko/branches/1.0/waskaweb/controllers/case.py
===================================================================
--- wasko/branches/1.0/waskaweb/controllers/case.py	2009-09-08 09:47:07 UTC (rev 597)
+++ wasko/branches/1.0/waskaweb/controllers/case.py	2009-09-08 13:45:35 UTC (rev 598)
@@ -84,7 +84,7 @@
 from waskaweb.model.phase_transition import symbol_phase, phase_symbol, \
                                             phase_neighbors, phase_start, \
                                             PHASE_DESCRIPTIONS, \
-                                            CLEAR_START, CLEAR_ENDE
+                                            CLEAR_START, CLEAR_ENDE, CM_ENDE, NB_ENDE
 
 from waskaweb.converter.wasko_v1v2   import WaskoV1V2
 
@@ -1440,9 +1440,9 @@
         c.ds_id   = id
         #c.form_navigation = self._getFormNavigation()
         # Check if the case is in a consistent state (all required fields
-        # are filled)
+        # are filled also check if the phase is finished.)
         case = self._loadCase(id)
-        if (not case.getState().phasesAreConsistent() or not case.getState().phasesAreCompleted()) and case.isYoungerThan(INCONSISTENCY_CHECK_AFTER):
+        if (not case.getState().phasesAreConsistent() or not case.getState().phasesAreCompleted() or not case.getState().getPhase() in (CM_ENDE, NB_ENDE)) and case.isYoungerThan(INCONSISTENCY_CHECK_AFTER):
             c.failed_for  = MARKANONYMIZE_INCOMPLETE_PHASE_FAILED 
             if case.getState().getPhase() in (CLEAR_START, CLEAR_ENDE):
                 c.failed_text = \



More information about the Mpuls-commits mailing list