[Mpuls-commits] r1935 - in wasko/branches/2.0: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 11 17:20:03 CET 2010


Author: bh
Date: 2010-03-11 17:19:57 +0100 (Thu, 11 Mar 2010)
New Revision: 1935

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/controllers/formularpage.py
Log:
* mpulsweb/controllers/formularpage.py
(convertErrorItem2ErrorDic): Do not check the error items type.
The type attribute can be used to distinguishe between semantic
errors and violations of error rules, but it cannot be used to
tell warnings from errors.
(get_rendered_page): Always set warnings to an empty dict because
the list of error items used will not contain any warning anyway.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-11 11:36:50 UTC (rev 1934)
+++ wasko/branches/2.0/ChangeLog	2010-03-11 16:19:57 UTC (rev 1935)
@@ -1,3 +1,13 @@
+2010-03-11  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/controllers/formularpage.py
+	(convertErrorItem2ErrorDic): Do not check the error items type.
+	The type attribute can be used to distinguishe between semantic
+	errors and violations of error rules, but it cannot be used to
+	tell warnings from errors.
+	(get_rendered_page): Always set warnings to an empty dict because
+	the list of error items used will not contain any warning anyway.
+
 2010-03-09  Bernhard Herzog  <bh at intevation.de>
 
 	* mpulsweb/lib/renderer.py

Modified: wasko/branches/2.0/mpulsweb/controllers/formularpage.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/formularpage.py	2010-03-11 11:36:50 UTC (rev 1934)
+++ wasko/branches/2.0/mpulsweb/controllers/formularpage.py	2010-03-11 16:19:57 UTC (rev 1935)
@@ -33,8 +33,7 @@
     errors = {}
     for items in error_items:
         for e in items:
-            if e.type == 0:
-                errors[e.name] = e.msg
+            errors[e.name] = e.msg
     return errors
 
 def convertErrorItem2WarningDic(error_items):
@@ -94,7 +93,7 @@
     page = instance_tree.getItem(id)
 
     errors = convertErrorItem2ErrorDic(page.getErrors())
-    warnings = convertErrorItem2WarningDic(page.getErrors())
+    warnings = {}
     defaults = convertErrorItem2ValueDic(page.getErrors())
 
     if page:



More information about the Mpuls-commits mailing list