Commit b3cf36d2 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Catalog call might raise exceptions.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5555 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ace56db3
......@@ -102,8 +102,11 @@ class ERP5GroupManager(BasePlugin):
security_definition_list = mapping_method()
# get the person from its reference
catalog_result = self.portal_catalog(
portal_type="Person", reference=user_name)
try:
catalog_result = self.portal_catalog(
portal_type="Person", reference=user_name)
except AttributeError:
return []
if len(catalog_result) != 1: # we won't proceed with groups
if len(catalog_result) > 1: # configuration is screwed
raise 'ConsistencyError', 'There is more than one Person whose \
......
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