web/views/actions.py
branchstable
changeset 3689 deb13e88e037
parent 3495 438576c5b1d1
child 3720 5376aaadd16b
child 3877 7ca53fc72a0a
child 4212 ab6573088b4a
--- a/web/views/actions.py	Thu Oct 15 18:43:04 2009 +0200
+++ b/web/views/actions.py	Thu Oct 15 20:29:21 2009 +0200
@@ -36,7 +36,7 @@
             return 1
         for rschema, targetschemas, role in AutomaticEntityForm.erelations_by_category(
             entity, ('primary', 'secondary'), 'add', strict=True):
-            if not rschema.is_final():
+            if not rschema.final:
                 return 1
         return 0
 
@@ -62,7 +62,7 @@
         if len(select.defined_vars) == 1 and len(select.solutions) == 1:
             rset._searched_etype = select.solutions[0].itervalues().next()
             eschema = cls.schema.eschema(rset._searched_etype)
-            if not (eschema.is_final() or eschema.is_subobject(strict=True)) \
+            if not (eschema.final or eschema.is_subobject(strict=True)) \
                    and eschema.has_perm(req, 'add'):
                 return 1
     return 0
@@ -266,7 +266,7 @@
         for role, rschemas in (('subject', eschema.subject_relations()),
                                ('object', eschema.object_relations())):
             for rschema in rschemas:
-                if rschema.is_final():
+                if rschema.final:
                     continue
                 # check the relation can be added as well
                 # XXX consider autoform_permissions_overrides?