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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue May 24 13:17:02 CEST 2011


Author: bh
Date: 2011-05-24 13:17:01 +0200 (Tue, 24 May 2011)
New Revision: 4995

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/evaluate.py
Log:
* mpulsweb/controllers/evaluate.py
(EvaluateController.evaluateAction): Make sure to the correct
predefined options for adele evaluations.
Fixes part of mpuls/issue1744


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-05-24 11:14:24 UTC (rev 4994)
+++ base/trunk/ChangeLog	2011-05-24 11:17:01 UTC (rev 4995)
@@ -1,5 +1,12 @@
 2011-05-24  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/evaluate.py
+	(EvaluateController.evaluateAction): Make sure to the correct
+	predefined options for adele evaluations.
+	Fixes part of mpuls/issue1744
+
+2011-05-24  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/evaluate.py (get_default_adele_options):
 	New. Like get_default_options, but for "adele" evaluations.
 	(EvaluateController.evaluate): Rework how the various option

Modified: base/trunk/mpulsweb/controllers/evaluate.py
===================================================================
--- base/trunk/mpulsweb/controllers/evaluate.py	2011-05-24 11:14:24 UTC (rev 4994)
+++ base/trunk/mpulsweb/controllers/evaluate.py	2011-05-24 11:17:01 UTC (rev 4995)
@@ -254,6 +254,13 @@
                                               errors=form_errors,
                                               auto_insert_errors=False)
 
+        if id == 0:
+            # when doing adele evaluations, always use the
+            # defaults. Since the options are shown as disabled in the
+            # HTML form, form_result will usually not contain them
+            # anyway.
+            form_result.update(get_default_adele_options())
+
         # Build evaluation
         eval_params = self._get_evalparams(form_result, session.get("id_field"),
                                            session.get("sql_where"))



More information about the Mpuls-commits mailing list