Commit e40756db authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

ERP5Security: support ERP5User without Person that is (for now) used in unit tests.

parent e641651b
......@@ -214,14 +214,14 @@ class ERP5User(PropertiedUser):
result = self._user_value
if result is not None:
return result
user, = [x for x in self.aq_parent.searchUsers(
user_list = [x for x in self.aq_parent.searchUsers(
exact_match=True,
id=self.getId(),
) if 'path' in x]
result = self._user_value = self.getPortalObject().restrictedTraverse(
user['path'],
)
return result
if len(user_list) == 1:
result = self._user_value = self.getPortalObject().restrictedTraverse(
user_list[0]['path'])
return result
def getLoginValue(self):
""" -> login document
......
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