[Mpuls-commits] r2374 - wasko/branches/2.0/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Apr 15 13:09:01 CEST 2010


Author: torsten
Date: 2010-04-15 13:09:01 +0200 (Thu, 15 Apr 2010)
New Revision: 2374

Modified:
   wasko/branches/2.0/mpulsweb/model/phase.py
Log:
* mpulsweb/model/phase.py (PhaseList.get_current_phase): Add unknown
	phase to the very first phasepart (id==0) as predessor.


Modified: wasko/branches/2.0/mpulsweb/model/phase.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/phase.py	2010-04-15 10:56:41 UTC (rev 2373)
+++ wasko/branches/2.0/mpulsweb/model/phase.py	2010-04-15 11:09:01 UTC (rev 2374)
@@ -199,6 +199,11 @@
         self.pre = pre
         self.fields = []
 
+        # If id is 0 (which should be the start phasepart of the first phase,
+        # add "unknown" phase as predesessor) 
+        if self.id == '0':
+            self.pre.append('-1')
+
         if not it: return
         formed = it.getFormEd()
 
@@ -230,7 +235,7 @@
 
     def is_neighbor(self, phase):
         log.debug("phase: %s suc: %s, pre: %s" % (self.id, self.suc, self.pre))
-        return (phase in self.suc) or (phase in self.pre) 
+        return (phase in self.suc) or (phase in self.pre)
 
     def getLinks(self):
         out = []



More information about the Mpuls-commits mailing list