Commit 2b53e495 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Tatuya Kamada

Initialise underlying folder if not initialised on _setObject call.

Fixes Zope 2.13 .
parent d32f9efa
...@@ -962,8 +962,12 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn): ...@@ -962,8 +962,12 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn):
def _setObject(self, *args, **kw): def _setObject(self, *args, **kw):
if self._folder_handler == HBTREE_HANDLER: if self._folder_handler == HBTREE_HANDLER:
if self._htree is None:
HBTreeFolder2Base.__init__(self, self.id)
return CMFHBTreeFolder._setObject(self, *args, **kw) return CMFHBTreeFolder._setObject(self, *args, **kw)
else: else:
if self._tree is None:
BTreeFolder2Base.__init__(self, self.id)
return CMFBTreeFolder._setObject(self, *args, **kw) return CMFBTreeFolder._setObject(self, *args, **kw)
def get(self, id, default=None): 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