Commit b1e9fa38 authored by Aurel's avatar Aurel

check that newContent exists on current container otherwise use zope

method to create folder


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26620 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5f7397b2
......@@ -65,6 +65,10 @@ class TrashTool(BaseTool):
if 'portal' in path:
path += '_items'
if path not in backup_object_container.objectIds():
if not hasattr(aq_base(backup_object_container), "newContent"):
backup_object_container.manage_addFolder(id=path,)
backup_object_container = backup_object_container._getOb(path)
else:
backup_object_container = backup_object_container.newContent(portal_type='Trash Folder', id=path,
is_indexable=0)
backup_object_container.edit(isHidden=1)
......
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