oops
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Tue, 23 Dec 2008 14:38:59 +0100
changeset 266 b36670d730b2
parent 265 97361ddaf342
child 275 7c47bc8550d4
oops
common/selectors.py
--- 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):