Commit 349d4f68 authored by Ivan Tyagov's avatar Ivan Tyagov

Minor fixes. Get only first found result

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14491 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b535bddc
...@@ -91,7 +91,7 @@ class NotificationTool(BaseTool): ...@@ -91,7 +91,7 @@ class NotificationTool(BaseTool):
# Change all strings to object values # Change all strings to object values
if isinstance(sender, basestring): if isinstance(sender, basestring):
sender = catalog_tool.getObject(portal_type='Person', reference=sender) sender = catalog_tool(portal_type='Person', reference=sender)[0]
email_from_address = None email_from_address = None
if sender is not None: if sender is not None:
...@@ -109,7 +109,7 @@ class NotificationTool(BaseTool): ...@@ -109,7 +109,7 @@ class NotificationTool(BaseTool):
recipient = [recipient] recipient = [recipient]
to_list = [] to_list = []
for user in recipient: for user in recipient:
user_value = catalog_tool.getObject(portal_type='Person', reference=user) user_value = catalog_tool(portal_type='Person', reference=user)[0]
if user_value is not None: if user_value is not None:
to_list.append(user_value) to_list.append(user_value)
......
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