Commit 8b5f9b25 authored by Vincent Pelletier's avatar Vincent Pelletier

Ignore serialization_tag when its value is None.

Add a test.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19534 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9aaa691d
...@@ -121,6 +121,9 @@ class Message: ...@@ -121,6 +121,9 @@ class Message:
else: else:
self.active_process = active_process.getPhysicalPath() self.active_process = active_process.getPhysicalPath()
self.active_process_uid = active_process.getUid() self.active_process_uid = active_process.getUid()
if activity_kw.get('serialization_tag', False) is None:
# Remove serialization_tag if it's None.
del activity_kw['serialization_tag']
self.activity_kw = activity_kw self.activity_kw = activity_kw
self.method_id = method_id self.method_id = method_id
self.args = args self.args = args
......
...@@ -2796,6 +2796,11 @@ class TestCMFActivity(ERP5TypeTestCase): ...@@ -2796,6 +2796,11 @@ class TestCMFActivity(ERP5TypeTestCase):
self.tic() self.tic()
result = activity_tool.getMessageList() result = activity_tool.getMessageList()
self.assertEqual(len(result), 0) self.assertEqual(len(result), 0)
# Check that giving a None value to serialization_tag does not confuse
# CMFActivity
organisation.activate(activity=activity, serialization_tag=None).getTitle()
self.tic()
self.assertEqual(len(activity_tool.getMessageList()), 0)
def test_106_checkSerializationTagSQLDict(self, quiet=0, run=run_all_test): def test_106_checkSerializationTagSQLDict(self, quiet=0, run=run_all_test):
if not run: return if not run: return
......
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