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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Dec 23 13:33:34 CET 2010


Author: bh
Date: 2010-12-23 13:33:33 +0100 (Thu, 23 Dec 2010)
New Revision: 4423

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/search.py
Log:
* mpulsweb/lib/search.py (CaseSearch.get_needle_clause): Only
create the real clause if there were actually any match_fields
given.
Fixes the immediate problem of mpuls/issue1627


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-12-22 14:03:58 UTC (rev 4422)
+++ base/trunk/ChangeLog	2010-12-23 12:33:33 UTC (rev 4423)
@@ -1,3 +1,10 @@
+2010-12-23  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/lib/search.py (CaseSearch.get_needle_clause): Only
+	create the real clause if there were actually any match_fields
+	given.
+	Fixes the immediate problem of mpuls/issue1627
+
 2010-12-22  Torsten Irlaender <torsten at intevation.de>
 
 	* mpulsweb/i18n/de/LC_MESSAGES/mpulsweb.po: Issue1623: Fixed

Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2010-12-22 14:03:58 UTC (rev 4422)
+++ base/trunk/mpulsweb/lib/search.py	2010-12-23 12:33:33 UTC (rev 4423)
@@ -332,7 +332,7 @@
         Derived classes may override this method if necessary.
         """
         search = options.get("search_string", ())
-        if search:
+        if search and self.match_fields:
             needle_expr = ("((%s) OR (%s))"
                            % (" OR ".join("m.%s ~* '%%(needle)s'"
                                           % field



More information about the Mpuls-commits mailing list