equal
deleted
inserted
replaced
421 continue |
421 continue |
422 break |
422 break |
423 else: |
423 else: |
424 assert 0 |
424 assert 0 |
425 key = rschema.type + '-subject' |
425 key = rschema.type + '-subject' |
426 msg, args = constraint.failed_message(key, self.entity.cw_edited[rschema.type]) |
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 |
|
428 # point, we currently rely on the fact that such constraint will provide a dedicated user |
|
429 # message not relying on the `value` argument |
|
430 msg, args = constraint.failed_message(key, self.entity.cw_edited.get(rschema.type)) |
427 raise ValidationError(self.entity.eid, {key: msg}, args) |
431 raise ValidationError(self.entity.eid, {key: msg}, args) |