selectors.py
changeset 3393 58a62864bae4
parent 3369 7b88d12b4ee2
child 3396 fb261afd49cd
equal deleted inserted replaced
3392:36bcf206e157 3393:58a62864bae4
   612                 return 0
   612                 return 0
   613             else:
   613             else:
   614                 # only check this is a known type if etype comes from req.form,
   614                 # only check this is a known type if etype comes from req.form,
   615                 # else we want the error to propagate
   615                 # else we want the error to propagate
   616                 try:
   616                 try:
   617                     etype = cls.vreg.case_insensitive_etypes[etype.lower()]
   617                     etype = req.vreg.case_insensitive_etypes[etype.lower()]
   618                     req.form['etype'] = etype
   618                     req.form['etype'] = etype
   619                 except KeyError:
   619                 except KeyError:
   620                     return 0
   620                     return 0
   621         return self.score_class(cls.vreg['etypes'].etype_class(etype), req)
   621         return self.score_class(req.vreg['etypes'].etype_class(etype), req)
   622 
   622 
   623 
   623 
   624 class entity_implements(ImplementsMixIn, EntitySelector):
   624 class entity_implements(ImplementsMixIn, EntitySelector):
   625     """accept if entity instances found in the result set implements at least one
   625     """accept if entity instances found in the result set implements at least one
   626     of the interfaces given as argument. Returned score is the number of
   626     of the interfaces given as argument. Returned score is the number of