Commit a5382e6f authored by Georgios Dagkakis's avatar Georgios Dagkakis

ActivityTool: decode path and method_id when we try to get transaction's note

Otherwise, we may get error if we have special characters
parent 1e371494
...@@ -27,7 +27,7 @@ from __future__ import absolute_import ...@@ -27,7 +27,7 @@ from __future__ import absolute_import
# #
############################################################################## ##############################################################################
from six import string_types as basestring from six import string_types as basestring
from Products.ERP5Type.Utils import ensure_list from Products.ERP5Type.Utils import ensure_list, str2unicode
import copy import copy
import socket import socket
...@@ -359,7 +359,10 @@ class Message(BaseMessage): ...@@ -359,7 +359,10 @@ class Message(BaseMessage):
# that method ! # that method !
method = getattr(obj, self.method_id) method = getattr(obj, self.method_id)
transaction.get().note( transaction.get().note(
u'CMFActivity {}/{}'.format('/'.join(self.object_path), self.method_id) u'CMFActivity {}/{}'.format(
'/'.join([str2unicode(x) for x in self.object_path]),
str2unicode(self.method_id),
)
) )
# Store site info # Store site info
setSite(activity_tool.getParentValue()) setSite(activity_tool.getParentValue())
......
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