Commit 653f3ffa authored by Romain Courteaud's avatar Romain Courteaud

Directly access suboject from container. For an unknown reason, it may fail...

Directly access suboject from container. For an unknown reason, it may fail when accessing it from trashtool

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45185 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 79c2700f
...@@ -137,8 +137,7 @@ class TrashTool(BaseTool): ...@@ -137,8 +137,7 @@ class TrashTool(BaseTool):
obj = self.unrestrictedTraverse(object_path) obj = self.unrestrictedTraverse(object_path)
if obj is not None: if obj is not None:
for subobject_id in list(obj.objectIds()): for subobject_id in list(obj.objectIds()):
subobject_path = object_path + [subobject_id] subobject = obj.unrestrictedTraverse(subobject_id)
subobject = self.unrestrictedTraverse(subobject_path)
subobject_copy = subobject._p_jar.exportFile(subobject._p_oid) subobject_copy = subobject._p_jar.exportFile(subobject._p_oid)
subobjects_dict[subobject_id] = subobject_copy subobjects_dict[subobject_id] = subobject_copy
if save: # remove subobjecs from backup object if save: # remove subobjecs from backup object
......
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