[Mpuls-commits] r3504 - in jmd/trunk: . jmdweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Aug 31 21:08:06 CEST 2010
Author: bh
Date: 2010-08-31 21:08:03 +0200 (Tue, 31 Aug 2010)
New Revision: 3504
Modified:
jmd/trunk/ChangeLog
jmd/trunk/jmdweb/lib/search.py
Log:
* jmdweb/lib/search.py (CaseSearch.get_ending_clause): Use
generic_int_choice_clause instead of having the equivalent code
inline.
Modified: jmd/trunk/ChangeLog
===================================================================
--- jmd/trunk/ChangeLog 2010-08-31 19:05:04 UTC (rev 3503)
+++ jmd/trunk/ChangeLog 2010-08-31 19:08:03 UTC (rev 3504)
@@ -1,5 +1,11 @@
2010-08-31 Bernhard Herzog <bh at intevation.de>
+ * jmdweb/lib/search.py (CaseSearch.get_ending_clause): Use
+ generic_int_choice_clause instead of having the equivalent code
+ inline.
+
+2010-08-31 Bernhard Herzog <bh at intevation.de>
+
* jmdweb/lib/search.py (CaseSearch.convert_form_parameters): Add
extended parameter. Only handle "type_ending" search option if
it's an extended search.
Modified: jmd/trunk/jmdweb/lib/search.py
===================================================================
--- jmd/trunk/jmdweb/lib/search.py 2010-08-31 19:05:04 UTC (rev 3503)
+++ jmd/trunk/jmdweb/lib/search.py 2010-08-31 19:08:03 UTC (rev 3504)
@@ -81,14 +81,8 @@
selected. If that list is empty, no ending will be OK, so no
case will be found.
"""
- if "type_ending" in options:
- endings = options["type_ending"]
- if endings:
- return ('m.art_cm_ende IN (%s)'
- % ','.join([str(ending) for ending in endings]))
- else:
- return "FALSE"
- return "TRUE"
+ return self.generic_int_choice_clause(options, "type_ending",
+ "m.art_cm_ende")
def get_where_subclauses(self, options):
return CaseBaseSearch.get_where_subclauses(self, options) + [
More information about the Mpuls-commits
mailing list