Commit 6a6698c9 authored by Aurel's avatar Aurel

fix indentation of code thus roles of portal types are not installed

at each bt installation but depends on user selection


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24287 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e093ecda
......@@ -2405,13 +2405,13 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem):
action = update_dict[roles_path]
if action == 'nothing':
continue
path = 'portal_types/%s' % roles_path.split('/', 1)[1]
obj = p.unrestrictedTraverse(path, None)
if obj is not None:
setattr(obj, '_roles', []) # reset roles before applying
type_roles_list = self._objects[roles_path] or []
for type_role_property_dict in type_roles_list:
obj._roles.append(RoleInformation(**type_role_property_dict))
path = 'portal_types/%s' % roles_path.split('/', 1)[1]
obj = p.unrestrictedTraverse(path, None)
if obj is not None:
setattr(obj, '_roles', []) # reset roles before applying
type_roles_list = self._objects[roles_path] or []
for type_role_property_dict in type_roles_list:
obj._roles.append(RoleInformation(**type_role_property_dict))
def uninstall(self, context, **kw):
p = context.getPortalObject()
......
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