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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 31 21:01:53 CEST 2010


Author: bh
Date: 2010-08-31 21:01:47 +0200 (Tue, 31 Aug 2010)
New Revision: 3501

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/search.py
Log:
* mpulsweb/lib/search.py (CaseSearch.get_dates_clause): The
options dictionary might not contain the "phase" key.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-31 18:55:18 UTC (rev 3500)
+++ base/trunk/ChangeLog	2010-08-31 19:01:47 UTC (rev 3501)
@@ -1,5 +1,10 @@
 2010-08-31  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/search.py (CaseSearch.get_dates_clause): The
+	options dictionary might not contain the "phase" key.
+
+2010-08-31  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/case_bundle.py
 	(CaseBundleController._build_casebundle): Use
 	search_options_from_session instead of equivalent duplicated

Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2010-08-31 18:55:18 UTC (rev 3500)
+++ base/trunk/mpulsweb/lib/search.py	2010-08-31 19:01:47 UTC (rev 3501)
@@ -359,7 +359,7 @@
                     AND (%s::date <= '%s'::date)
                     AND (coalesce(%s, now())::date >= '%s'::date))
                 ''' % (sp.id, ep.id, sp.datefield, ed, ep.datefield, sd))
-            if -1 in options["phase"]:
+            if -1 in options.get("phase", ()):
                 time_interval_str.append("(m.phase = -1)")
             time_interval = "(%s)" % "OR".join(time_interval_str)
         return time_interval



More information about the Mpuls-commits mailing list