process_posted yield field instead of field's name
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 21 Dec 2009 20:24:47 +0100
changeset 4166 677e487e691a
parent 4165 eb9acad29407
child 4167 73e649a7797d
process_posted yield field instead of field's name
web/formfields.py
--- a/web/formfields.py	Mon Dec 21 20:23:56 2009 +0100
+++ b/web/formfields.py	Mon Dec 21 20:24:47 2009 +0100
@@ -355,12 +355,12 @@
     def process_posted(self, form):
         for field in self.actual_fields(form):
             if field is self:
-                yield field.name, field.process_form_value(form)
+                yield field, field.process_form_value(form)
             else:
                 # recursive function: we might have compound fields
                 # of compound fields (of compound fields of ...)
-                for fieldname, value in field.process_posted(form):
-                    yield fieldname, value
+                for field, value in field.process_posted(form):
+                    yield field, value
 
 
 class StringField(Field):