Commit 7bc5270d authored by Nicolas Delaby's avatar Nicolas Delaby

Fix a mistake inserted by variable renaming

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23557 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3626a364
......@@ -289,13 +289,15 @@ class NotificationTool(BaseTool):
if recipient:
if not isinstance(recipient, (list, tuple)):
recipient = (recipient,)
for person_reference in recipient:
if isinstance(person_reference, basestring):
person = catalog_tool.getResultValue(portal_type=portal_type_list,
reference=person_reference)
if person is None:
for person in recipient:
if isinstance(person, basestring):
person_value = catalog_tool.getResultValue(portal_type=portal_type_list,
reference=person)
if person_value is None:
# For backward compatibility. I recommend to use ValueError.(yusei)
raise IndexError, "Can't find person document which reference is '%s'" % person_reference
raise IndexError, "Can't find person document which reference is '%s'" % person
else:
person = person_value
email_value = person.getDefaultEmailValue()
if email_value is None:
# For backward compatibility. I recommend to use ValueError.(yusei)
......
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