Commit 691e9f3a authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_base: Do not rely on the absence of surprising user ids.

parent 73b4299a
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
return SimpleQuery(owner=[
owner = [
x.user_id for x in
context.getPortalObject().portal_catalog(
select_list=['user_id'],
title=value,
)
] or value or -1)
] or value
if owner:
return SimpleQuery(owner=owner)
return SimpleQuery(uid=-1)
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