--- a/cubicweb/entities/adapters.py Wed Mar 13 10:21:39 2019 +0100
+++ b/cubicweb/entities/adapters.py Mon Mar 11 17:43:23 2019 +0100
@@ -27,6 +27,7 @@
from cubicweb import (Unauthorized, ValidationError, view, ViolatedConstraint,
UniqueTogetherError)
+from cubicweb.schema import constraint_name_for
from cubicweb.predicates import is_instance, relation_possible, match_exception
@@ -474,7 +475,7 @@
for rschema, attrschema in eschema.attribute_definitions():
rdef = rschema.rdef(eschema, attrschema)
for constraint in rdef.constraints:
- if cstrname == constraint.name_for(rdef):
+ if cstrname == constraint_name_for(constraint, rdef):
break
else:
continue