[Mpuls-commits] r5668 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Nov 25 13:15:21 CET 2011
Author: bh
Date: 2011-11-25 13:15:21 +0100 (Fri, 25 Nov 2011)
New Revision: 5668
Modified:
base/trunk/mpulsweb/controllers/evaluate.py
Log:
Use append, not extend to add the phase to the all_phases list.
The phase variable holds the id of a phase as a string. Using extend
instead of append only works correctly by accident because all phase ids
currently used in mpuls that may end up being added to all_phases are
single-digit numbers (negative numbers are excluded by the condition
earlier in the code).
Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py 2011-11-25 10:48:15 UTC (rev 5667)
+++ base/trunk/mpulsweb/controllers/evaluate.py 2011-11-25 12:15:21 UTC (rev 5668)
@@ -206,7 +206,7 @@
# phase is unknown -> has no start and endphase
sdf, edf = get_phase_dates(p)
suc = get_phase_successors(p)
- all_phases.extend(p)
+ all_phases.append(p)
tdates.append("('%s'::date <= %s AND '%s'::date >= %s"
" AND phase IN (%s) )"
% (params.get('start_date'), edf,
More information about the Mpuls-commits
mailing list