Commit 1095d342 authored by Alexandre Boeglin's avatar Alexandre Boeglin

fix for older versions of BTreeFolder2 with no _initBTrees method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10965 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6ff4bdf3
......@@ -819,7 +819,11 @@ be a problem)."""
# when an object inherits from Folder after it was instanciated, it lacks
# its BTreeFolder properties.
if getattr(self, '_tree', None) is None:
self._initBTrees()
try:
self._initBTrees()
except AttributeError:
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2Base
BTreeFolder2Base.__init__(self, self.getId())
object_list = CMFBTreeFolder.objectValues(self, spec=spec)
if portal_type is not None:
if type(portal_type) == type(''):
......
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