selectors.py
branchtls-sprint
changeset 656 3f2956c186ef
parent 654 36e87179e91d
child 657 fd019f41aa2f
equal deleted inserted replaced
655:ca3c4992c7d1 656:3f2956c186ef
   952     def plug_selector(cls, vreg):
   952     def plug_selector(cls, vreg):
   953         cls = registered(cls, vreg)
   953         cls = registered(cls, vreg)
   954         if getattr(cls, 'type', None):
   954         if getattr(cls, 'type', None):
   955             warn('use relation_possible selector instead of using etype_rtype',
   955             warn('use relation_possible selector instead of using etype_rtype',
   956                  DeprecationWarning)
   956                  DeprecationWarning)
   957             cls.__selectors__ += (relation_possible(cls.rtype), role(cls),
   957             cls.__selectors__ += (relation_possible(cls.rtype, role(cls),
   958                                   getattr(cls, 'etype', None),
   958                                                     getattr(cls, 'etype', None),
   959                                   action=getattr(cls, 'require_permission', 'read'))
   959                                                     action=getattr(cls, 'require_permission', 'read')))
   960         return cls
   960         return cls
   961     return plug_selector
   961     return plug_selector