[Mpuls-commits] r4181 - in base/trunk: . mpulsweb/controllers mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Nov 15 20:30:36 CET 2010


Author: bh
Date: 2010-11-15 20:30:35 +0100 (Mon, 15 Nov 2010)
New Revision: 4181

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/evaluate.py
   base/trunk/mpulsweb/model/phase.py
Log:
* mpulsweb/controllers/evaluate.py
(EvaluateController._get_evalparams): Adapt to renaming of
get_phase_successors

* mpulsweb/model/phase.py (get_phasesuccessors)
(get_phase_successors): Rename to the more readable
get_phase_successors


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-11-15 19:20:50 UTC (rev 4180)
+++ base/trunk/ChangeLog	2010-11-15 19:30:35 UTC (rev 4181)
@@ -1,5 +1,15 @@
 2010-11-15  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/model/phase.py (get_phasesuccessors)
+	(get_phase_successors): Rename to the more readable
+	get_phase_successors
+
+	* mpulsweb/controllers/evaluate.py
+	(EvaluateController._get_evalparams): Adapt to renaming of
+	get_phase_successors
+
+2010-11-15  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/evaluate.py (get_phasesuccessors),
 	mpulsweb/model/phase.py (get_phasesuccessors): Move
 	get_phasesuccessors from controllers/evaluate.py to model/phase.py

Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py	2010-11-15 19:20:50 UTC (rev 4180)
+++ base/trunk/mpulsweb/controllers/evaluate.py	2010-11-15 19:30:35 UTC (rev 4181)
@@ -14,7 +14,7 @@
 from mpulsweb.lib.base import BaseController, render, request, response, session
 from mpulsweb.lib.db import db
 from mpulsweb.lib.validators import EvaluationFormValidator
-from mpulsweb.model.phase import PhaseFactory, get_phasesuccessors
+from mpulsweb.model.phase import PhaseFactory, get_phase_successors
 
 
 log = logging.getLogger(__name__)
@@ -127,7 +127,7 @@
                     if int(p) >= 0:
                         # phase is unknown -> has no start and endphase
                         sdf, edf = get_phase_dates(p)
-                        suc = get_phasesuccessors(p)
+                        suc = get_phase_successors(p)
                         all_phases.extend(p)
                         tdates.append("('%s'::date <= %s AND '%s'::date >= %s"
                                       " AND phase IN (%s) )"

Modified: base/trunk/mpulsweb/model/phase.py
===================================================================
--- base/trunk/mpulsweb/model/phase.py	2010-11-15 19:20:50 UTC (rev 4180)
+++ base/trunk/mpulsweb/model/phase.py	2010-11-15 19:30:35 UTC (rev 4181)
@@ -52,7 +52,7 @@
     return result
 
 
-def get_phasesuccessors(p):
+def get_phase_successors(p):
     suc = []
     phaselist = PhaseFactory().build()
     for phase in phaselist:
@@ -61,7 +61,7 @@
             suc.append(phase.end.id)
             for ppid in phase.end.suc:
                 pp = phaselist.get_phase(ppid)
-                suc.extend(get_phasesuccessors(pp.phase))
+                suc.extend(get_phase_successors(pp.phase))
     return suc
 
 



More information about the Mpuls-commits mailing list