equal
deleted
inserted
replaced
270 if attr.startswith('reverse_'): |
270 if attr.startswith('reverse_'): |
271 attr = attr[len('reverse_'):] |
271 attr = attr[len('reverse_'):] |
272 role = 'object' |
272 role = 'object' |
273 else: |
273 else: |
274 role = 'subject' |
274 role = 'subject' |
275 assert eschema.has_relation(attr, role) |
275 assert eschema.has_relation(attr, role), '%s %s not found on %s' % (attr, role, eschema) |
276 rschema = eschema.subjrels[attr] if role == 'subject' else eschema.objrels[attr] |
276 rschema = eschema.subjrels[attr] if role == 'subject' else eschema.objrels[attr] |
277 if not rschema.final and isinstance(value, (tuple, list, set, frozenset)): |
277 if not rschema.final and isinstance(value, (tuple, list, set, frozenset)): |
278 if len(value) == 1: |
278 if len(value) == 1: |
279 value = iter(value).next() |
279 value = iter(value).next() |
280 else: |
280 else: |