web/views/autoform.py
branchtls-sprint
changeset 1702 312310ed8a2f
parent 1607 9747a0aa753c
child 1721 694f6a50e138
--- a/web/views/autoform.py	Wed May 06 09:46:26 2009 +0200
+++ b/web/views/autoform.py	Wed May 06 09:46:36 2009 +0200
@@ -5,6 +5,7 @@
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 __docformat__ = "restructuredtext en"
+_ = unicode
 
 from logilab.common.decorators import iclassmethod
 
@@ -15,7 +16,6 @@
 from cubicweb.web.formwidgets import Button, SubmitButton
 from cubicweb.web.views.editforms import toggleable_relation_link, relation_id
 
-_ = unicode
 
 class AutomaticEntityForm(EntityFieldsForm):
     """base automatic form to edit any entity.
@@ -244,7 +244,7 @@
 
     def editable_attributes(self):
         """return a list of (relation schema, role) to edit for the entity"""
-        return [(rschema, x) for rschema, _, x in self.relations_by_category(
+        return [(rschema, role) for rschema, _, role in self.relations_by_category(
                 self.attrcategories, 'add') if rschema != 'eid']
 
     def relations_table(self):