Commit a1930d8b authored by Jérome Perrin's avatar Jérome Perrin

simplify

if condition:
  return 1
else:
  return 0
in "return condition"


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17885 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 680c6b17
......@@ -286,10 +286,7 @@ class Category(Folder):
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