fix editable_attributes bug (closes #1534802) stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Wed, 09 Mar 2011 12:24:50 +0100
branchstable
changeset 7063 b07ee816bffb
parent 7060 f26a1cbddc91
child 7064 b8ce2266d026
fix editable_attributes bug (closes #1534802)
web/views/autoform.py
--- a/web/views/autoform.py	Tue Mar 08 18:21:40 2011 +0100
+++ b/web/views/autoform.py	Wed Mar 09 12:24:50 2011 +0100
@@ -785,7 +785,8 @@
     def editable_attributes(self, strict=False):
         """return a list of (relation schema, role) to edit for the entity"""
         if self.display_fields is not None:
-            return self.display_fields
+            schema = self._cw.vreg.schema
+            return [(schema[rtype], role) for rtype, role in self.display_fields]
         if self.edited_entity.has_eid() and not self.edited_entity.cw_has_perm('update'):
             return []
         # XXX we should simply put eid in the generated section, no?