[Mpuls-commits] r2633 - wasko/branches/2.0/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 5 10:27:15 CEST 2010
Author: torsten
Date: 2010-05-05 10:27:11 +0200 (Wed, 05 May 2010)
New Revision: 2633
Modified:
wasko/branches/2.0/mpulsweb/model/phase.py
Log:
* mpulsweb/model/phase.py (PhaseList.check_consistence): Added
attribute "phase". Consitence will be checked for the given phase.
default is current phase.
Modified: wasko/branches/2.0/mpulsweb/model/phase.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/phase.py 2010-05-05 08:18:50 UTC (rev 2632)
+++ wasko/branches/2.0/mpulsweb/model/phase.py 2010-05-05 08:27:11 UTC (rev 2633)
@@ -168,13 +168,18 @@
except ConsistenceCheckException, e:
return False
- def check_consistence(self, fields=None):
- current_phase = self.get_current_phase_id()
+ def check_consistence(self, fields=None, phase=None):
+ log.debug('fields: %s' % fields)
+ if phase is not None:
+ current_phase = phase
+ else:
+ current_phase = self.get_current_phase_id()
path = self.get_path(current_phase)
for phases in self:
p1, p2 = phases.getStart(), phases.getEnd()
if p1.id <= current_phase and p1.id in path:
+ log.debug('checking p1: %s' % p1.id)
if not p1.is_ok(fields, check_setting_phase=False):
errors = []
errors.append('<ol>')
@@ -185,6 +190,7 @@
% (phases.description, "".join(errors)))
if p2.id <= current_phase and p2.id in path:
+ log.debug('checking p1: %s' % p2.id)
if not p2.is_ok(fields, check_setting_phase=False):
errors = []
errors.append('<ol>')
More information about the Mpuls-commits
mailing list