Commit 22d3b174 authored by Vincent Pelletier's avatar Vincent Pelletier

Use isinstance() instead of type().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15407 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b4b98a9c
...@@ -427,7 +427,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -427,7 +427,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
local_roles = kw['local_roles'] local_roles = kw['local_roles']
new_allowedRolesAndUsers = [] new_allowedRolesAndUsers = []
# Turn it into a list if necessary according to ';' separator # Turn it into a list if necessary according to ';' separator
if type(local_roles) == type('a'): if isinstance(local_roles, str):
local_roles = local_roles.split(';') local_roles = local_roles.split(';')
# Local roles now has precedence (since it comes from a WorkList) # Local roles now has precedence (since it comes from a WorkList)
for user_or_group in allowedRolesAndUsers: for user_or_group in allowedRolesAndUsers:
......
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