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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Oct 7 16:45:38 CEST 2010


Author: bh
Date: 2010-10-07 16:45:37 +0200 (Thu, 07 Oct 2010)
New Revision: 3922

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/evaluate.py
Log:
* mpulsweb/controllers/evaluate.py
(EvaluateController._do_export): Rename the variable form_result
to params to reduce confusion.  form_result is usually used for
the minimally processed form parameters.  The value in _do_export
is actually the return value of _get_evalparams which contains the
parameters after further processing and it contains information
that was not included directly in any form (such as a fragment of
an SQL statement).


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-07 14:35:03 UTC (rev 3921)
+++ base/trunk/ChangeLog	2010-10-07 14:45:37 UTC (rev 3922)
@@ -1,6 +1,17 @@
 2010-10-07  Bernhard Herzog  <bh at intevation.de>
 
 	* mpulsweb/controllers/evaluate.py
+	(EvaluateController._do_export): Rename the variable form_result
+	to params to reduce confusion.  form_result is usually used for
+	the minimally processed form parameters.  The value in _do_export
+	is actually the return value of _get_evalparams which contains the
+	parameters after further processing and it contains information
+	that was not included directly in any form (such as a fragment of
+	an SQL statement).
+
+2010-10-07  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/controllers/evaluate.py
 	(EvaluateController._do_export): New method containing the code
 	shared by exportCSV and exportXML.
 	(EvaluateController.exportXML, EvaluateController.exportCSV): Use

Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py	2010-10-07 14:35:03 UTC (rev 3921)
+++ base/trunk/mpulsweb/controllers/evaluate.py	2010-10-07 14:45:37 UTC (rev 3922)
@@ -269,20 +269,20 @@
         return self._do_export(EvaluationExportCSV)
 
     def _do_export(self, export_class):
-        form_result = session.get('evaluation.params')
+        params = session.get('evaluation.params')
         try:
             try:
                 conn = db.getConnection()
                 cur = None
-                evalconfig = EvaluationConfig(get_configfile(form_result['id']),
+                evalconfig = EvaluationConfig(get_configfile(params['id']),
                                               conn,
-                                              form_result['start_date'],
-                                              form_result['end_date'],
-                                              form_result['start_date_field'],
-                                              form_result['end_date_field'],
+                                              params['start_date'],
+                                              params['end_date'],
+                                              params['start_date_field'],
+                                              params['end_date_field'],
                                               None,
-                                              form_result['sql'],
-                                              form_result['typelist'])
+                                              params['sql'],
+                                              params['typelist'])
                 evalset = EvaluationSet(evalconfig)
                 evalset.evaluate()
                 return evalset.export(export_class())



More information about the Mpuls-commits mailing list