[Mpuls-commits] r5629 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Nov 18 23:25:36 CET 2011
Author: bh
Date: 2011-11-18 23:24:57 +0100 (Fri, 18 Nov 2011)
New Revision: 5629
Modified:
base/trunk/mpulsweb/controllers/formularpage.py
Log:
Pass a case object, not just the case id, to _check_case_validity.
Now that the caller, the save method, already has a case object, it's
better reuse that instead of instantiating a new one in
_check_case_validity.
There are no other callers and no application overwrites the
_check_case_validity method, so nothing else has to be changed.
Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py 2011-11-18 22:02:33 UTC (rev 5628)
+++ base/trunk/mpulsweb/controllers/formularpage.py 2011-11-18 22:24:57 UTC (rev 5629)
@@ -189,7 +189,7 @@
page_id = ti.nextKey().key
# Check consistence of case and retag
- self._check_case_validity(case_id)
+ self._check_case_validity(case)
phase_changed = self._handle_automatic_phase_change(page_id)
if phase_changed:
@@ -203,9 +203,8 @@
special cases. The default implementation does nothing.
"""
- def _check_case_validity(self, case_id):
+ def _check_case_validity(self, case):
"""Check validity of the case given by case_id."""
- case = self._loadCase(case_id)
case.checkValidity()
def _handle_automatic_phase_change(self, page_id):
More information about the Mpuls-commits
mailing list