# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1241595996 -7200 # Node ID 312310ed8a2f047e8859232433d9af92b60b34f6 # Parent 9fb5b4741a08ab721f1416718dacb7edb34f59bf cleanup diff -r 9fb5b4741a08 -r 312310ed8a2f 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):