Commit d77ea263 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

quick fix which closes #0673348 - see comment for more info

parent 012e6c7d02ef
......@@ -423,5 +423,9 @@ class IUserFriendlyCheckConstraint(IUserFriendlyError):
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)
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