--- a/cubicweb/entities/adapters.py Fri Jul 08 10:17:14 2016 +0200
+++ b/cubicweb/entities/adapters.py Fri Jul 08 10:17:42 2016 +0200
@@ -21,7 +21,6 @@
from cubicweb import _
from itertools import chain
-from hashlib import md5
from logilab.mtconverter import TransformError
from logilab.common.decorators import cached
@@ -413,9 +412,7 @@
for rschema, attrschema in eschema.attribute_definitions():
rdef = rschema.rdef(eschema, attrschema)
for constraint in rdef.constraints:
- if cstrname == 'cstr' + md5(
- (eschema.type + rschema.type + constraint.type() +
- (constraint.serialize() or '')).encode('ascii')).hexdigest():
+ if cstrname == constraint.name_for(rdef):
break
else:
continue