diff --git a/opengever/sharing/local_roles_lookup/manager.py b/opengever/sharing/local_roles_lookup/manager.py index a390ce5694..a064966c16 100644 --- a/opengever/sharing/local_roles_lookup/manager.py +++ b/opengever/sharing/local_roles_lookup/manager.py @@ -69,6 +69,11 @@ def update_lookup_table(self, context): self.delete_all_by_uid(context.UID()) for principal, roles in context.get_local_roles(): + if not principal: + # It's possible that some local roles are assigned to 'None'. + # We should skip those principals. + continue + managed_roles = list(set(roles).intersection(self.MANAGED_ROLES)) if not managed_roles: continue