Commit 381f7aad authored by Aurel's avatar Aurel

fix uninstall of portal type roles


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11686 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e8af53a0
......@@ -2167,7 +2167,12 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem):
def uninstall(self, context, **kw):
p = context.getPortalObject()
for roles_path in self._objects.keys():
object_path = kw.get('object_path', None)
if object_path is not None:
keys = [object_path]
else:
keys = self._objects.keys()
for roles_path in keys:
path = 'portal_types/%s' % roles_path.split('/', 1)[1]
obj = p.unrestrictedTraverse(path)
setattr(obj, '_roles', [])
......
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