web/views/editforms.py
branchtls-sprint
changeset 1135 00eb43688a57
parent 1132 96752791c2b6
child 1138 22f634977c95
--- a/web/views/editforms.py	Mon Mar 23 18:20:23 2009 +0100
+++ b/web/views/editforms.py	Mon Mar 23 18:53:53 2009 +0100
@@ -102,8 +102,8 @@
     def __init__(self, *args, **kwargs):
         super(AutomaticEntityForm, self).__init__(*args, **kwargs)
         self.entity.complete()
-        for rschema, target in self.editable_attributes(entity):
-            field = guess_field(entity.__class__, entity.e_schema, rschema, target)
+        for rschema, target in self.editable_attributes(self.entity):
+            field = guess_field(entity.__class__, self.entity.e_schema, rschema, target)
             self.fields.append(field)
             
     def form_buttons(self):