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

propagate **kw in _getCategoryMembershipList, _getDefaultCategoryMembership and

_getDefaultAcquiredCategoryMembership


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26579 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ccd614d8
...@@ -2247,14 +2247,14 @@ class Base( CopyContainer, ...@@ -2247,14 +2247,14 @@ class Base( CopyContainer,
checked_permission=checked_permission) checked_permission=checked_permission)
self.reindexObject() self.reindexObject()
def _getCategoryMembershipList(self, category, spec=(), filter=None, portal_type=(), base=0, def _getCategoryMembershipList(self, category, spec=(), filter=None,
keep_default=1, checked_permission=None): portal_type=(), base=0, keep_default=1, checked_permission=None, **kw):
""" """
This returns the list of categories for an object This returns the list of categories for an object
""" """
return self._getCategoryTool().getCategoryMembershipList(self, category, spec=spec, return self._getCategoryTool().getCategoryMembershipList(self, category,
filter=filter, portal_type=portal_type, base=base, spec=spec, filter=filter, portal_type=portal_type, base=base,
keep_default=keep_default, checked_permission=checked_permission) keep_default=keep_default, checked_permission=checked_permission, **kw)
security.declareProtected( Permissions.AccessContentsInformation, 'getCategoryMembershipList' ) security.declareProtected( Permissions.AccessContentsInformation, 'getCategoryMembershipList' )
getCategoryMembershipList = _getCategoryMembershipList getCategoryMembershipList = _getCategoryMembershipList
...@@ -2307,22 +2307,22 @@ class Base( CopyContainer, ...@@ -2307,22 +2307,22 @@ class Base( CopyContainer,
return [(x, x) for x in membership_list] return [(x, x) for x in membership_list]
return [(x,getattr(x, method_id)()) for x in membership_list] return [(x,getattr(x, method_id)()) for x in membership_list]
def _getDefaultCategoryMembership(self, category, spec=(), filter=None, portal_type=(), base=0, def _getDefaultCategoryMembership(self, category, spec=(), filter=None,
default=None, checked_permission=None ): portal_type=(), base=0, default=None, checked_permission=None, **kw):
membership = self._getCategoryMembershipList(category, membership = self._getCategoryMembershipList(category,
spec=spec, filter=filter, portal_type=portal_type, base=base, spec=spec, filter=filter, portal_type=portal_type, base=base,
checked_permission=checked_permission) checked_permission=checked_permission, **kw)
if len(membership) > 0: if len(membership) > 0:
return membership[0] return membership[0]
else: else:
return default return default
def _getDefaultAcquiredCategoryMembership(self, category, def _getDefaultAcquiredCategoryMembership(self, category, spec=(),
spec=(), filter=None, portal_type=(), base=0, default=None, filter=None, portal_type=(), base=0, default=None,
checked_permission=None, **kw): checked_permission=None, **kw):
membership = self._getAcquiredCategoryMembershipList(category, membership = self._getAcquiredCategoryMembershipList(category,
spec=spec, filter=filter, portal_type=portal_type, base=base, spec=spec, filter=filter, portal_type=portal_type, base=base,
checked_permission=checked_permission) checked_permission=checked_permission, **kw)
if len(membership) > 0: if len(membership) > 0:
return membership[0] return membership[0]
else: else:
......
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