Commit 1b62294f authored by Aurel's avatar Aurel

do no try getitem on catalog at uninstall

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13545 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b56291b3
......@@ -804,9 +804,11 @@ class ObjectTemplateItem(BaseTemplateItem):
object_id = relative_url.split('/')[-1]
try:
container = portal.unrestrictedTraverse(container_path)
object = container[object_id] # We force access to the object to be sure
# that appropriate exception is thrown
# in case object is already backup and/or removed
if container.aq_parent.meta_type != 'ERP5 Catalog':
# __getitem__ on a catalog wait for an uid
object = container[object_id] # We force access to the object to be sure
# that appropriate exception is thrown
# in case object is already backup and/or removed
if trash and trashbin is not None:
self.portal_trash.backupObject(trashbin, container_path, object_id, save=1, keep_subobjects=1)
container.manage_delObjects([object_id])
......
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