Commit 06cf84e9 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Fix KeyError on role without reference when building business templates

parent faee5904
......@@ -3056,7 +3056,8 @@ class PortalTypeRolesTemplateItem(BaseTemplateItem):
if not k:
continue
type_role_dict[k] = v
type_role_list.append(type_role_dict)
if 'id' in type_role_dict:
type_role_list.append(type_role_dict)
type_role_list.sort(key=lambda x: (x.get('title'), x['object_id'],))
# Function to generate XML Code Manually
......
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