Commit db0e32cf authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type/Message: check mapping is a dict at creation time

If mapping is not a dict, we store a message that would fail later when
being viewed, typically breaking History tab when used in workflow
history.
parent 206271c8
Pipeline #28902 failed with stage
in 0 seconds
......@@ -96,6 +96,8 @@ class Message(Persistent):
def __init__(self, domain=None, message='',
mapping=None, default=None):
self.message = message
if mapping is not None:
assert isinstance(mapping, dict)
self.mapping = mapping
self.domain = domain
if default is None:
......
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