equal
deleted
inserted
replaced
743 relpossel = relation_possible(self.rtype, self.role, self.target_etype) |
743 relpossel = relation_possible(self.rtype, self.role, self.target_etype) |
744 if not relpossel.score_class(entity.__class__, entity.req): |
744 if not relpossel.score_class(entity.__class__, entity.req): |
745 return 0 |
745 return 0 |
746 rset = entity.related(self.rtype, self.role) |
746 rset = entity.related(self.rtype, self.role) |
747 if self.target_etype: |
747 if self.target_etype: |
748 return any(x for x, in rset.description if x == self.target_etype) |
748 return any(r for r in rset.description if r[0] == self.target_etype) |
749 return rset and 1 or 0 |
749 return rset and 1 or 0 |
750 |
750 |
751 |
751 |
752 class partial_has_related_entities(PartialSelectorMixIn, has_related_entities): |
752 class partial_has_related_entities(PartialSelectorMixIn, has_related_entities): |
753 """partial version of the has_related_entities selector |
753 """partial version of the has_related_entities selector |