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

support default argument in _getDefaultCategoryMembership, and reuse

_getCategoryMembershipList in the implementation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26558 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 38d80fc9
No related merge requests found
......@@ -2305,14 +2305,14 @@ class Base( CopyContainer,
return [(x,getattr(x, method_id)()) for x in membership_list]
def _getDefaultCategoryMembership(self, category, spec=(), filter=None, portal_type=(), base=0,
checked_permission=None ):
membership = self._getCategoryTool().getCategoryMembershipList(self,
category, spec=spec, filter=filter, portal_type=portal_type, base=base,
checked_permission=checked_permission)
default=None, checked_permission=None ):
membership = self._getCategoryMembershipList(category,
spec=spec, filter=filter, portal_type=portal_type, base=base,
checked_permission=checked_permission)
if len(membership) > 0:
return membership[0]
else:
return None
return default
def _getDefaultAcquiredCategoryMembership(self, category,
spec=(), filter=None, portal_type=(), base=0, default=None,
......
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