[Mpuls-commits] r3876 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 4 15:24:35 CEST 2010


Author: torsten
Date: 2010-10-04 15:24:34 +0200 (Mon, 04 Oct 2010)
New Revision: 3876

Modified:
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCaseState.getPhaseDescription):
	Issue1049: Do not display "running/finished" info for the unknown
	phase


Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-10-04 13:16:36 UTC (rev 3875)
+++ base/trunk/mpulsweb/model/case.py	2010-10-04 13:24:34 UTC (rev 3876)
@@ -1261,6 +1261,10 @@
         phase = phases.get_current_phase()
         desc.append(g.mpuls_config.get('phases',
                                        'description')[0].get(phase.phase))
+
+        # If phase is "unknown" do not append "running/finished" 
+        if phase.id == "-1":
+            return " ".join(desc)
         if isinstance(phase, StartPhasePart):
             desc.append(_('Running'))
         else:



More information about the Mpuls-commits mailing list