[Mpuls-commits] r2213 - in wasko/branches/2.0: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 25 20:21:27 CET 2010


Author: bh
Date: 2010-03-25 20:21:26 +0100 (Thu, 25 Mar 2010)
New Revision: 2213

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/controllers/case_overview.py
Log:
* mpulsweb/controllers/case_overview.py (parseSearchOptions):
Refactor code a little to make it more readable and to keep the
lines short


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-25 19:09:54 UTC (rev 2212)
+++ wasko/branches/2.0/ChangeLog	2010-03-25 19:21:26 UTC (rev 2213)
@@ -1,5 +1,11 @@
 2010-03-25  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/case_overview.py (parseSearchOptions):
+	Refactor code a little to make it more readable and to keep the
+	lines short
+
+2010-03-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/case_bundle.py: Fix formatting.
 
 2010-03-25  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/mpulsweb/controllers/case_overview.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/case_overview.py	2010-03-25 19:09:54 UTC (rev 2212)
+++ wasko/branches/2.0/mpulsweb/controllers/case_overview.py	2010-03-25 19:21:26 UTC (rev 2213)
@@ -48,8 +48,10 @@
             log.debug(pp)
             # Get phasepart ids for the selected phasepairs. Only if pairs are
             # defined.
-            if len(g.mpuls_config.get('phases', 'pairs')) <= 0: continue
-            for p in g.mpuls_config.get('phases', 'pairs')[0].get(str(pp), [-1]):
+            pairs = g.mpuls_config.get('phases', 'pairs')
+            if len(pairs) <= 0:
+                continue
+            for p in pairs[0].get(str(pp), [-1]):
                 search_options.append('phase:%s' % p)
 
     return search_options



More information about the Mpuls-commits mailing list