[Mpuls-commits] r6056 - base/trunk/mpulsweb/model
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Tue Aug 28 09:45:42 CEST 2012
Author: bricks
Date: 2012-08-28 09:45:42 +0200 (Tue, 28 Aug 2012)
New Revision: 6056
Modified:
base/trunk/mpulsweb/model/phase.py
Log:
Always return a phase for the current phase
Avoid tracebacks if no or an invalid phase is set in the database. In that case
return a unkonwn dummy phase for the current phase.
mpuls/issue3357 (mpuls_S: Fehler in der Validierung)
Modified: base/trunk/mpulsweb/model/phase.py
===================================================================
--- base/trunk/mpulsweb/model/phase.py 2012-08-27 12:05:19 UTC (rev 6055)
+++ base/trunk/mpulsweb/model/phase.py 2012-08-28 07:45:42 UTC (rev 6056)
@@ -162,6 +162,10 @@
if p2.is_active():
return phase
+ log.warn("No current phase found returning Unkonwn dummy phase")
+ return Phase("-1", EndPhasePart('-1', None, ['1'], []), None,
+ _("Unkown"))
+
def get_phase(self, id):
'''Returns the PhasePart of the id'''
for p in self:
More information about the Mpuls-commits
mailing list