From 05522434abac393f3a072ddd4bb904591eb0e5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Fri, 30 Mar 2007 13:56:15 +0000 Subject: [PATCH] if security_uid_list is empty, return None, thus this result is taken into account when using count/searchResult git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13826 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Catalog/CatalogTool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product/ERP5Catalog/CatalogTool.py b/product/ERP5Catalog/CatalogTool.py index 7cc7b5e098..af94c77383 100644 --- a/product/ERP5Catalog/CatalogTool.py +++ b/product/ERP5Catalog/CatalogTool.py @@ -481,6 +481,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): if allowedRolesAndUsers: allowedRolesAndUsers = ["'%s'" % (role, ) for role in allowedRolesAndUsers] security_uid_list = [x.uid for x in method(security_roles_list = allowedRolesAndUsers)] + if len(security_uid_list) == 0: + security_uid_list = None if role_column_dict: query_list = [] for key, value in role_column_dict.items(): -- 2.30.9