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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 27 19:42:17 CEST 2010


Author: bh
Date: 2010-08-27 19:42:16 +0200 (Fri, 27 Aug 2010)
New Revision: 3471

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/app_globals.py
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/lib/app_globals.py (Globals._init_case): Instantiate
case_search.

* mpulsweb/model/case.py (MpulsCaseOverview.search): g.case_search
is already instantiated.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-27 17:41:02 UTC (rev 3470)
+++ base/trunk/ChangeLog	2010-08-27 17:42:16 UTC (rev 3471)
@@ -1,5 +1,13 @@
 2010-08-27  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/app_globals.py (Globals._init_case): Instantiate
+	case_search.
+
+	* mpulsweb/model/case.py (MpulsCaseOverview.search): g.case_search
+	is already instantiated.
+
+2010-08-27  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/search.py (Search.convert_form_parameters)
 	(CaseSearch.convert_form_parameters): Move the method from Search
 	to CaseSearch.  The parameters it handles only make sense for

Modified: base/trunk/mpulsweb/lib/app_globals.py
===================================================================
--- base/trunk/mpulsweb/lib/app_globals.py	2010-08-27 17:41:02 UTC (rev 3470)
+++ base/trunk/mpulsweb/lib/app_globals.py	2010-08-27 17:42:16 UTC (rev 3471)
@@ -127,4 +127,6 @@
         self.case.set_fields(self.mpuls_config.get("case", "fields"))
         self.case_factory = case_module.CaseFactory(self.case)
         search_module = import_overridable_module("lib.search")
-        self.case_search  = search_module.CaseSearch
+        self.case_search = search_module.CaseSearch(
+            self.case_factory.get_search_retrieve_fields(),
+            self.case_factory.get_search_match_fields())

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-08-27 17:41:02 UTC (rev 3470)
+++ base/trunk/mpulsweb/model/case.py	2010-08-27 17:42:16 UTC (rev 3471)
@@ -1109,9 +1109,7 @@
 
     def search(self, search_str=None):
         self.ds_list = []
-        search = g.case_search(g.case_factory.get_search_retrieve_fields(),
-                               g.case_factory.get_search_match_fields())
-        result = search.perform(search_str)
+        result = g.case_search.perform(search_str)
         factory = g.case_factory
         for row in result:
             case = factory.loadFromQueryResult(row)



More information about the Mpuls-commits mailing list