Commit 22887cde authored by Jérome Perrin's avatar Jérome Perrin

ObjectMessage: also accept a message instance in constructor

parent 0cfbc8ca
......@@ -41,6 +41,10 @@ class ObjectMessage:
def __init__(self, object_relative_url='', message='', mapping={}, **kw):
self.object_relative_url = object_relative_url
from Products.ERP5Type.Message import Message
if isinstance(message, Message):
mapping = message.mapping
message = message.message
self.message = message
self.mapping = mapping
......
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