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):
# Change all strings to object values
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
if sender is not None:
......@@ -109,7 +109,7 @@ class NotificationTool(BaseTool):
recipient = [recipient]
to_list = []
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:
to_list.append(user_value)
......@@ -128,4 +128,4 @@ class NotificationTool(BaseTool):
# policies such as grouped notification (per hour, per day,
# per week, etc.) depending on user preferences. It
# also add some urgency and selection of notification
# tool (ex SMS vs. email)
\ No newline at end of file
# tool (ex SMS vs. email)
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