Commit 7fc3ff26 authored by Aurel's avatar Aurel

catch exception raise from Formulator because container of backup

object is not a form


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4949 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b58acb14
......@@ -85,7 +85,14 @@ class TrashTool(BaseTool):
copy.seek(0)
backup = connection.importFile(copy)
backup.isIndexable = 0
backup_object_container._setObject(object_id, backup)
try:
backup_object_container._setObject(object_id, backup)
except AttributeError:
# XXX we can go here due to formulator because attribute field_added
# doesn't not exists on parent if it is a Trash Folder and not a Form
# so object is not backup
LOG("Trash Tool backupObject", 100, "Can't backup object %s" %(object_id))
pass
keep_sub = kw.get('keep_subobjects', 0)
subobjects_dict = {}
......
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