web/views/editforms.py
changeset 4007 91d11fda4aa0
parent 3998 94cc7cad3d2d
child 4023 eae23c40627a
--- a/web/views/editforms.py	Mon Dec 07 06:51:33 2009 -0800
+++ b/web/views/editforms.py	Mon Dec 07 07:10:40 2009 -0800
@@ -169,8 +169,8 @@
 
     def should_edit_attribute(self, entity, rschema, role, form):
         rtype = str(rschema)
-        ttype = rschema.targets(entity.id, role)[0]
-        afs = uicfg.autoform_section.etype_get(entity.id, rtype, role, ttype)
+        ttype = rschema.targets(entity.__regid__, role)[0]
+        afs = uicfg.autoform_section.etype_get(entity.__regid__, rtype, role, ttype)
         if 'main_hidden' in afs or not entity.has_perm('update'):
             return False
         try: