fix AddComboBoxWidget stable
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Thu, 03 Sep 2009 13:06:36 +0200
branchstable
changeset 3106 226da883d17a
parent 3097 a7adeca85656
child 3107 0829808e93c1
fix AddComboBoxWidget
web/formwidgets.py
--- 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'''