Commit 6831bae2 authored by Jérome Perrin's avatar Jérome Perrin

If no local roles, save an empty dict (not None)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5328 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8ada3254
...@@ -3090,8 +3090,10 @@ class LocalRolesTemplateItem(BaseTemplateItem): ...@@ -3090,8 +3090,10 @@ class LocalRolesTemplateItem(BaseTemplateItem):
p = context.getPortalObject() p = context.getPortalObject()
for path in self._archive.keys(): for path in self._archive.keys():
obj = p.unrestrictedTraverse(path.split('/', 1)[1]) obj = p.unrestrictedTraverse(path.split('/', 1)[1])
local_roles_dict = getattr(obj, '__ac_local_roles__', {}) local_roles_dict = getattr(obj, '__ac_local_roles__',
group_local_roles_dict = getattr(obj, '__ac_local_group_roles__', {}) {}) or {}
group_local_roles_dict = getattr(obj, '__ac_local_group_roles__',
{}) or {}
self._objects[path] = (local_roles_dict, group_local_roles_dict) self._objects[path] = (local_roles_dict, group_local_roles_dict)
def generateXml(self, path=None): def generateXml(self, path=None):
......
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