equal
deleted
inserted
replaced
425 key = rschema.type + '-subject' |
425 key = rschema.type + '-subject' |
426 # use .get since a constraint may be associated to an attribute that isn't edited (e.g. |
426 # use .get since a constraint may be associated to an attribute that isn't edited (e.g. |
427 # constraint between two attributes). This should be the purpose of an api rework at some |
427 # constraint between two attributes). This should be the purpose of an api rework at some |
428 # point, we currently rely on the fact that such constraint will provide a dedicated user |
428 # point, we currently rely on the fact that such constraint will provide a dedicated user |
429 # message not relying on the `value` argument |
429 # message not relying on the `value` argument |
430 msg, args = constraint.failed_message(key, self.entity.cw_edited.get(rschema.type)) |
430 value = self.entity.cw_edited.get(rschema.type) |
|
431 msg, args = constraint.failed_message(key, value, self.entity) |
431 raise ValidationError(self.entity.eid, {key: msg}, args) |
432 raise ValidationError(self.entity.eid, {key: msg}, args) |