[Mpuls-commits] r5395 - wasko/trunk/waskoweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 27 15:19:43 CEST 2011


Author: ludwig
Date: 2011-09-27 15:19:41 +0200 (Tue, 27 Sep 2011)
New Revision: 5395

Modified:
   wasko/trunk/waskoweb/controllers/caselifetime.py
Log:
Issue 2373: Reject a reopening shouldn't trigger an KeyError exception.
Check if the datum_cm_ende is in the dict data_for_rule_check, if yes remove
it. In 3 of 4 cases this is not in the dict.


Modified: wasko/trunk/waskoweb/controllers/caselifetime.py
===================================================================
--- wasko/trunk/waskoweb/controllers/caselifetime.py	2011-09-27 08:10:40 UTC (rev 5394)
+++ wasko/trunk/waskoweb/controllers/caselifetime.py	2011-09-27 13:19:41 UTC (rev 5395)
@@ -610,7 +610,8 @@
                 # datum_cm_ende and trying to set it may trigger the
                 # backdating rules.
                 data_for_rule_check = form_result.copy()
-                del data_for_rule_check["datum_cm_ende"]
+                if data_for_rule_check.has_key("datum_cm_ende"):
+                    del data_for_rule_check["datum_cm_ende"]
                 S(it, data_for_rule_check, case_id, do_write=False)
                 if (form_result.get('cm_wiederauf_genehm_1') == '1'
                     or form_result.get('cm_wiederauf_genehm_2') == '1'):



More information about the Mpuls-commits mailing list