[Mpuls-commits] r3473 - in base/trunk: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Aug 27 20:16:54 CEST 2010


Author: bh
Date: 2010-08-27 20:16:51 +0200 (Fri, 27 Aug 2010)
New Revision: 3473

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/case_overview.py
Log:
* mpulsweb/controllers/case_overview.py
(CaseOverviewController.search): Call the case_search object's
validate_form_params method instead of the using SearchCaseForm
directly


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-08-27 18:14:50 UTC (rev 3472)
+++ base/trunk/ChangeLog	2010-08-27 18:16:51 UTC (rev 3473)
@@ -1,5 +1,12 @@
 2010-08-27  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/case_overview.py
+	(CaseOverviewController.search): Call the case_search object's
+	validate_form_params method instead of the using SearchCaseForm
+	directly
+
+2010-08-27  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/search.py (CaseSearch.validate_form_params): New.
 	Validate search form parameters.  It's a method on the search
 	object now so that it can be extended by MPuls applications.

Modified: base/trunk/mpulsweb/controllers/case_overview.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_overview.py	2010-08-27 18:14:50 UTC (rev 3472)
+++ base/trunk/mpulsweb/controllers/case_overview.py	2010-08-27 18:16:51 UTC (rev 3473)
@@ -8,7 +8,6 @@
 
 from mpulsweb.lib.base import c, render, request, session, BaseController
 from mpulsweb.lib.security import checkRole
-from mpulsweb.lib.validators import SearchCaseForm
 from mpulsweb.model.user import UserListObject
 from mpulsweb.model.case import MpulsCaseOverview
 
@@ -143,11 +142,10 @@
 
     @checkRole(('admin', 'cm', 'pt_dlr'))
     def search(self):
-        validator      = SearchCaseForm()
-        c.form_result  = {}
-        c.form_errors  = {}
+        c.form_result = {}
+        c.form_errors = {}
         try:
-            c.form_result = validator.to_python(request.params)
+            c.form_result = g.case_search.validate_form_params(request.params)
         except formencode.Invalid, error:
             log.exception("search: formencode error %s" % error)
             c.form_result = error.value



More information about the Mpuls-commits mailing list