selectors.py
branchtls-sprint
changeset 837 931e0dac47f0
parent 835 7dcb11dd443e
child 839 3a76e0a2a0b0
--- a/selectors.py	Wed Feb 18 22:37:13 2009 +0100
+++ b/selectors.py	Thu Feb 19 10:19:37 2009 +0100
@@ -941,10 +941,6 @@
 
 @lltrace
 def etype_rtype_selector(cls, req, rset, row=None, col=0, **kwargs):
-    """only check if the user has read access on the entity's type refered
-    by the .etype attribute and on the relations's type refered by the
-    .rtype attribute if set.
-    """
     schema = cls.schema
     perm = getattr(cls, 'require_permission', 'read')
     if hasattr(cls, 'etype'):
@@ -1044,7 +1040,7 @@
 def has_relation_compat(registered):
     def plug_selector(cls, vreg):
         cls = registered(cls, vreg)
-        if getattr(cls, 'type', None):
+        if getattr(cls, 'etype', None):
             warn('use relation_possible selector instead of using etype_rtype',
                  DeprecationWarning)
             cls.__select__ &= relation_possible(cls.rtype, role(cls),