[Mpuls-commits] r3477 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Aug 30 12:17:07 CEST 2010


Author: bh
Date: 2010-08-30 12:17:04 +0200 (Mon, 30 Aug 2010)
New Revision: 3477

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/search.py
Log:
* mpulsweb/lib/search.py (CaseSearch.get_phases_clause): It's not
guaranteed anymore that the options dictionary will have a "phase"
key.  Handle that case as if the value were an empty list.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-30 10:16:39 UTC (rev 3476)
+++ base/trunk/ChangeLog	2010-08-30 10:17:04 UTC (rev 3477)
@@ -1,5 +1,11 @@
 2010-08-30  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/search.py (CaseSearch.get_phases_clause): It's not
+	guaranteed anymore that the options dictionary will have a "phase"
+	key.  Handle that case as if the value were an empty list.
+
+2010-08-30  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/validators.py (BaseFormValidator.__init__): Call
 	the base class constructor.  Also, accept all kinds of parameters
 	and pass them through to he base classe constructor.  This way,

Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2010-08-30 10:16:39 UTC (rev 3476)
+++ base/trunk/mpulsweb/lib/search.py	2010-08-30 10:17:04 UTC (rev 3477)
@@ -233,7 +233,7 @@
 
         Derived classes may override this method if necessary.
         """
-        if options["phase"]:
+        if options.get("phase", ()):
             return ('m.phase IN (%s)'
                     % ','.join([str(p) for p in options["phase"]]))
         return "FALSE"



More information about the Mpuls-commits mailing list