[Mpuls-commits] r2304 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Apr 9 18:57:43 CEST 2010


Author: bh
Date: 2010-04-09 18:57:42 +0200 (Fri, 09 Apr 2010)
New Revision: 2304

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (ViewRenderer._checkWarnings): Do not
evaluate warning rules that refer to fields in conditionals that
are not currently available.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-04-09 15:15:32 UTC (rev 2303)
+++ wasko/branches/2.0/ChangeLog	2010-04-09 16:57:42 UTC (rev 2304)
@@ -1,3 +1,9 @@
+2010-04-09  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/lib/renderer.py (ViewRenderer._checkWarnings): Do not
+	evaluate warning rules that refer to fields in conditionals that
+	are not currently available.
+
 2010-04-09  Roland Geider <roland.geider at intevation.de>
 
 	* mpulsweb/templates/privacy/dialogs/missing_statement_body.mako: removed

Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-04-09 15:15:32 UTC (rev 2303)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py	2010-04-09 16:57:42 UTC (rev 2304)
@@ -361,6 +361,8 @@
 
         context = RuleEvalContext(self.it, id)
         for rule in rules:
+            if not self.it.rule_available(rule, context):
+                continue
             for result, variables in rule.getExpr().evaluate_instances(context):
                 if not result and id in variables:
                     self.warnings.setdefault(id, []).append(rule.getValue())



More information about the Mpuls-commits mailing list