[Mpuls-commits] r4465 - base/trunk/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 29 14:55:25 CET 2010


Author: torsten
Date: 2010-12-29 14:55:25 +0100 (Wed, 29 Dec 2010)
New Revision: 4465

Modified:
   base/trunk/mpulsweb/controllers/evaluation_overview.py
Log:
* mpulsweb/controllers/evaluation_overview.py (EvaluationOverviewController): Set and save  sql_where parameter.


Modified: base/trunk/mpulsweb/controllers/evaluation_overview.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluation_overview.py	2010-12-29 13:53:12 UTC (rev 4464)
+++ base/trunk/mpulsweb/controllers/evaluation_overview.py	2010-12-29 13:55:25 UTC (rev 4465)
@@ -113,7 +113,6 @@
         # Do the search if there are no errors
         c.cases = MpulsAgencyOverview()
         if not c.form_errors:
-            print search
             c.cases.search(search)
 
         # Values used in the template
@@ -149,6 +148,7 @@
         form_defaults["id_field"] = "m.fkz::integer"
         form_defaults["all_ids"] = " ".join(unicode(case.id)
                                             for case in c.cases.getDatasets())
+        form_defaults["sql_where"] = c.cases.getWhereSQL()
         return formencode.htmlfill.render(overview, defaults=form_defaults,
                                           errors=c.form_errors)
 
@@ -214,6 +214,7 @@
             if action == 'evaluate':
                 session["evaluation_ids"] = form_result.get('case_id') 
                 session["id_field"] = form_result.get('id_field') 
+                session["sql_where"] = form_result.get('sql_where') 
                 if form_result.get('all_cases') > 0:
                     session["evaluation_ids"] = form_result.get('all_ids') 
                 session.save()



More information about the Mpuls-commits mailing list