Commit 486eb01b authored by iv's avatar iv

ERP5Workflow: fix if/elif/else order in Folder.py

This avoid to raise NotImplementedError in _initBTree when _folder_handler
is a string containing, for example 'CMFBTreeFolderHandler'.
parent 1e87d0fe
...@@ -745,10 +745,11 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, ...@@ -745,10 +745,11 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder,
def _initBTrees(self): def _initBTrees(self):
if self._folder_handler == HBTREE_HANDLER: if self._folder_handler == HBTREE_HANDLER:
return CMFHBTreeFolder._initBTrees(self) return CMFHBTreeFolder._initBTrees(self)
elif self._folder_handler == BTREE_HANDLER: elif self._folder_handler == PERSISTENT_MAPPING_HANDLER:
return CMFBTreeFolder._initBTrees(self)
else:
raise NotImplementedError raise NotImplementedError
else:
return CMFBTreeFolder._initBTrees(self)
def hashId(self, id): def hashId(self, id):
"""Return a hash of id """Return a hash of id
......
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