Commit a19f97f7 authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

[entity] improve error message

--HG--
branch : oldstable
parent a0d3ea01f4bf
......@@ -270,7 +270,7 @@ class Entity(AppObject):
role = 'object'
else:
role = 'subject'
assert eschema.has_relation(attr, role)
assert eschema.has_relation(attr, role), '%s %s not found on %s' % (attr, role, eschema)
rschema = eschema.subjrels[attr] if role == 'subject' else eschema.objrels[attr]
if not rschema.final and isinstance(value, (tuple, list, set, frozenset)):
if len(value) == 1:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment