cleanup tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 06 May 2009 09:46:36 +0200
branchtls-sprint
changeset 1702 312310ed8a2f
parent 1701 9fb5b4741a08
child 1703 a2b5dfdb4b62
cleanup
web/views/autoform.py
--- 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):