has_been_modified shouldn't raise ProcessFormError
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 13 Jan 2010 16:00:42 +0100
changeset 4229 1c8e92afb94b
parent 4228 861f20659254
child 4230 6514a76eaa5c
has_been_modified shouldn't raise ProcessFormError
web/formfields.py
--- a/web/formfields.py	Wed Jan 13 16:00:06 2010 +0100
+++ b/web/formfields.py	Wed Jan 13 16:00:42 2010 +0100
@@ -344,7 +344,11 @@
             if isinstance(previous_value, tuple):
                 # widget should return a set of untyped eids
                 previous_value = set(unicode(e.eid) for e in previous_value)
-            if form.edited_entity.has_eid() and (previous_value == self.process_form_value(form)):
+            try:
+                new_value = self.process_form_value(form)
+            except ProcessFormError:
+                return True
+            if form.edited_entity.has_eid() and previous_value == new_value:
                 return False # not modified
             return True
         return False