web/formwidgets.py
branchstable
changeset 3106 226da883d17a
parent 2996 866a2c135c33
child 3388 b8be8fc77c27
child 3689 deb13e88e037
--- a/web/formwidgets.py	Wed Sep 02 10:41:05 2009 +0200
+++ b/web/formwidgets.py	Thu Sep 03 13:06:36 2009 +0200
@@ -430,8 +430,9 @@
         # XXX entity form specific
         entity = form.edited_entity
         attrs['cubicweb:etype_to'] = entity.e_schema
-        etype_from = entity.e_schema.subject_relation(self.name).objects(entity.e_schema)[0]
+        etype_from = entity.e_schema.subject_relation(field.name).objects(entity.e_schema)[0]
         attrs['cubicweb:etype_from'] = etype_from
+        return name, values, attrs
 
     def render(self, form, field, renderer):
         return super(AddComboBoxWidget, self).render(form, field, renderer) + u'''