Commit 19a3c582 authored by Aurel's avatar Aurel

remove check for ligth_install parameter for old bt version and use

getParentValue when uninstall zsql method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12094 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 16d1962c
...@@ -793,7 +793,7 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -793,7 +793,7 @@ class ObjectTemplateItem(BaseTemplateItem):
container.manage_delObjects([object_id]) container.manage_delObjects([object_id])
if container.aq_parent.meta_type == 'ERP5 Catalog' and len(container.objectIds()) == 0: if container.aq_parent.meta_type == 'ERP5 Catalog' and len(container.objectIds()) == 0:
# We are removing a ZSQLMethod, remove the SQLCatalog if empty # We are removing a ZSQLMethod, remove the SQLCatalog if empty
container.aq_parent.manage_delObjects([container.id]) container.getParentValue().manage_delObjects([container.id])
except (NotFound, KeyError, BadRequest): except (NotFound, KeyError, BadRequest):
# object is already backup and/or removed # object is already backup and/or removed
pass pass
...@@ -1041,9 +1041,6 @@ class CategoryTemplateItem(ObjectTemplateItem): ...@@ -1041,9 +1041,6 @@ class CategoryTemplateItem(ObjectTemplateItem):
portal = context.getPortalObject() portal = context.getPortalObject()
category_tool = portal.portal_categories category_tool = portal.portal_categories
tool_id = self.tool_id tool_id = self.tool_id
if light_install==0:
ObjectTemplateItem.install(self, context, trashbin, **kw)
else:
for relative_url in self._archive.keys(): for relative_url in self._archive.keys():
obj = self._archive[relative_url] obj = self._archive[relative_url]
# Wrap the object by an aquisition wrapper for _aq_dynamic. # Wrap the object by an aquisition wrapper for _aq_dynamic.
......
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