Commit 6fc69595 authored by Aurel's avatar Aurel

do not fail at uninstall if we don't find the object


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11692 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1f244d6e
...@@ -2174,8 +2174,11 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem): ...@@ -2174,8 +2174,11 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem):
keys = self._objects.keys() keys = self._objects.keys()
for roles_path in keys: for roles_path in keys:
path = 'portal_types/%s' % roles_path.split('/', 1)[1] path = 'portal_types/%s' % roles_path.split('/', 1)[1]
try:
obj = p.unrestrictedTraverse(path) obj = p.unrestrictedTraverse(path)
setattr(obj, '_roles', []) setattr(obj, '_roles', [])
except (NotFound, KeyError):
pass
class SitePropertyTemplateItem(BaseTemplateItem): class SitePropertyTemplateItem(BaseTemplateItem):
......
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