when validating a form, we should properly call 'actual_fields(form) on edited field else compound field are not correctly processed stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 23 Feb 2010 13:19:16 +0100
branchstable
changeset 4665 873ebd160954
parent 4664 bd5ecd5b9494
child 4666 737cbdb87e87
when validating a form, we should properly call 'actual_fields(form) on edited field else compound field are not correctly processed
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Tue Feb 23 12:59:30 2010 +0100
+++ b/web/views/editcontroller.py	Tue Feb 23 13:19:16 2010 +0100
@@ -159,8 +159,9 @@
                 field = form.field_by_name(name, role, eschema=entity.e_schema)
             else:
                 field = form.field_by_name(name, role)
-            if field.has_been_modified(form):
-                self.handle_formfield(form, field, rqlquery)
+            for field in field.actual_fields(form):
+                if field.has_been_modified(form):
+                    self.handle_formfield(form, field, rqlquery)
         if self.errors:
             errors = dict((f.role_name(), unicode(ex)) for f, ex in self.errors)
             raise ValidationError(entity.eid, errors)