Commit 04534890 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! use getId() instead of __str__.

parent 895557a9
......@@ -1425,7 +1425,7 @@ class SelectionTool( BaseTool, SimpleItem ):
user_id = tv.get('_user_id', None)
if user_id is not None:
return user_id
user_id = self.portal_membership.getAuthenticatedMember().getId()
user_id = self.portal_membership.getAuthenticatedMember().getIdOrUserName()
tv['_user_id'] = user_id
return user_id
......
  • In what cases is getId() None (as I believe this is the issue being fixed here) and we need selection to still work for such user ?

    Edited by Vincent Pelletier
  • @vpelletier in case of 'Anonymous User'. See isAnonymous() in the same file.

    I found it when I was checking why anonymous selection was not working in my project. Now I wonder why functional tests for anonymous selection were running fine without this change...

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