Commit 79c2700f authored by Romain Courteaud's avatar Romain Courteaud

Cleanup broken BTreeFolder2 which can prevent bt5 installation

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45184 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1489dc5d
......@@ -34,7 +34,7 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir
from Products.ERP5.Document.BusinessTemplate import getChainByType
from zLOG import LOG
from zLOG import LOG, WARNING
from DateTime import DateTime
from Acquisition import aq_base
......@@ -143,6 +143,11 @@ class TrashTool(BaseTool):
subobjects_dict[subobject_id] = subobject_copy
if save: # remove subobjecs from backup object
obj._delObject(subobject_id)
if subobject_id in obj.objectIds():
LOG('Products.ERP5.Tool.TrashTool', WARNING,
'Cleaning corrupted BTreeFolder2 object at %r.' % \
(subobject_path,))
obj._cleanup()
return subobjects_dict
def newTrashBin(self, bt_title='trash', bt=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