# HG changeset patch # User Sylvain Thénault # Date 1455267963 -3600 # Node ID df1f2d853d40a79e802bfb6a62a3e2633966c207 # Parent 012e6c7d02ef3f61bf5486b5383b4bf993ee682f quick fix which closes #0673348 - see comment for more info diff -r 012e6c7d02ef -r df1f2d853d40 entities/adapters.py --- a/entities/adapters.py Fri Feb 12 10:39:24 2016 +0100 +++ b/entities/adapters.py Fri Feb 12 10:06:03 2016 +0100 @@ -423,5 +423,9 @@ else: assert 0 key = rschema.type + '-subject' - msg, args = constraint.failed_message(key, self.entity.cw_edited[rschema.type]) + # use .get since a constraint may be associated to an attribute that isn't edited (e.g. + # constraint between two attributes). This should be the purpose of an api rework at some + # point, we currently rely on the fact that such constraint will provide a dedicated user + # message not relying on the `value` argument + msg, args = constraint.failed_message(key, self.entity.cw_edited.get(rschema.type)) raise ValidationError(self.entity.eid, {key: msg}, args)