common/selectors.py
changeset 266 b36670d730b2
parent 254 b1eda3dd844a
child 333 c65eccf85895
--- a/common/selectors.py	Mon Dec 22 19:06:36 2008 +0100
+++ b/common/selectors.py	Tue Dec 23 14:38:59 2008 +0100
@@ -358,7 +358,7 @@
     """
     if hasattr(cls, 'rtype'):
         perm = getattr(cls, 'require_permission', 'read')
-        if not schema.rschema(cls.rtype).has_perm(req, perm):
+        if not cls.schema.rschema(cls.rtype).has_perm(req, perm):
             return 0
         if row is None:
             for etype in rset.column_types(col or 0):
@@ -375,9 +375,8 @@
     .rtype attribute of the class, and if at least one entity type in the
     result set has this relation.
     """
-    schema = cls.schema
     perm = getattr(cls, 'require_permission', 'read')
-    if not schema.rschema(cls.rtype).has_perm(req, perm):
+    if not cls.schema.rschema(cls.rtype).has_perm(req, perm):
         return 0
     if row is None:
         for etype in rset.column_types(col or 0):