Commit f8680dbc authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

code optimisation suggested by leonardo.

parent 3c3ffc9b
...@@ -308,9 +308,7 @@ class Message(BaseMessage): ...@@ -308,9 +308,7 @@ class Message(BaseMessage):
context=activity_tool) context=activity_tool)
else: else:
# Store site info # Store site info
portal = getattr(obj, 'getPortalObject', lambda:None)() setSite(activity_tool.getParentValue())
if portal is not None:
if activity_tool.activity_timing_log: if activity_tool.activity_timing_log:
result = activity_timing_method(method, self.args, result = activity_timing_method(method, self.args,
else: else:
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