Commit 99d70961 authored by Romain Courteaud's avatar Romain Courteaud

Use getattr to prevent AttributeError.

Use aq_base to only fetch from document.
parent c731fb6a
......@@ -126,7 +126,7 @@ class LocalRoleAssignorMixIn(object):
changes_applied = True
if local_roles_group_id_group_id:
if ob.__ac_local_roles_group_id_dict__ != local_roles_group_id_group_id:
if getattr(aq_base(ob), '__ac_local_roles_group_id_dict__', None) != local_roles_group_id_group_id:
ob.__ac_local_roles_group_id_dict__ = local_roles_group_id_group_id
changes_applied = True
elif getattr(aq_base(ob),
......
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