Commit 64d64748 authored by Jérome Perrin's avatar Jérome Perrin

simplify boolean return


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22244 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8ce90584
......@@ -933,10 +933,7 @@ class BaseCategory(Category):
if checked_permission is not None:
checkPermission = self.portal_membership.checkPermission
def permissionFilter(obj):
if checkPermission(checked_permission, obj):
return 1
else:
return 0
return checkPermission(checked_permission, obj)
value_list = filter(permissionFilter, value_list)
return sortValueList(value_list, sort_on, sort_order, **kw)
......
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