Skip to content

Commit

Permalink
Merge pull request #8096 from 4teamwork/es/TI-1540-make-reindex-more-…
Browse files Browse the repository at this point in the history
…failsafe

Make reindex local roles lookup table more failsafe
  • Loading branch information
elioschmutz authored Nov 28, 2024
2 parents cd0a98f + ccb6798 commit 66e08b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opengever/sharing/local_roles_lookup/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66e08b6

Please sign in to comment.