don't make assumptions on the _setObject signature

This allows suppress_events to be passed to _setObject on Zope 2.12.
It will be the responsibility of the caller to catch the TypeError
in Zope 2.8 if suppress_events is passed


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32192 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 79977066
......@@ -877,11 +877,11 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
else:
return CMFBTreeFolder._checkId(self, id, allow_dup)
def _setObject(self, id, object, roles=None, user=None, set_owner=1):
def _setObject(self, *args, **kw):
if self._folder_handler == HBTREE_HANDLER:
return CMFHBTreeFolder._setObject(self, id, object, roles, user, set_owner)
return CMFHBTreeFolder._setObject(self, *args, **kw)
else:
return CMFBTreeFolder._setObject(self, id, object, roles, user, set_owner)
return CMFBTreeFolder._setObject(self, *args, **kw)
def get(self, id, 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