# HG changeset patch # User Alexandre Fayolle # Date 1255601448 -7200 # Node ID 2e4794c97cf46979c316fc2f8feec446c181b68a # Parent 9b62c5887639bfaa60ffd7bbb43e9a31503592b6 fix related_rql when target_type specified diff -r 9b62c5887639 -r 2e4794c97cf4 entity.py --- a/entity.py Thu Oct 15 11:56:56 2009 +0200 +++ b/entity.py Thu Oct 15 12:10:48 2009 +0200 @@ -695,14 +695,14 @@ if targettypes is None: targettypes = rschema.objects(self.e_schema) else: - restriction += 'E is IN (%s)' % ','.join(targettypes) + restriction += ', X is IN (%s)' % ','.join(targettypes) card = greater_card(rschema, (self.e_schema,), targettypes, 0) else: restriction = 'E eid %%(x)s, X %s E' % rtype if targettypes is None: targettypes = rschema.subjects(self.e_schema) else: - restriction += 'E is IN (%s)' % ','.join(targettypes) + restriction += ', X is IN (%s)' % ','.join(targettypes) card = greater_card(rschema, targettypes, (self.e_schema,), 1) if len(targettypes) > 1: fetchattrs_list = []