Commit f61cfe84 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

ConsistencyMessage: If no message is provided it fallbacks to constraint message

parent ce0988c5
...@@ -49,6 +49,8 @@ class ConsistencyMessage(ObjectMessage): ...@@ -49,6 +49,8 @@ class ConsistencyMessage(ObjectMessage):
self.class_name = "Constraint Message" self.class_name = "Constraint Message"
self.constraint_relative_url = "" self.constraint_relative_url = ""
if constraint: if constraint:
if not message:
message = constraint._getMessage('message_expression_false')
self.description = constraint.description self.description = constraint.description
self.class_name = constraint.__class__.__name__ self.class_name = constraint.__class__.__name__
# keep track of the relative URL of the constraint to have it included in # keep track of the relative URL of the constraint to have it included in
......
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