diff --git a/backend/src/openarchiefbeheer/accounts/managers.py b/backend/src/openarchiefbeheer/accounts/managers.py index 61d31541..990ed85c 100644 --- a/backend/src/openarchiefbeheer/accounts/managers.py +++ b/backend/src/openarchiefbeheer/accounts/managers.py @@ -8,7 +8,11 @@ def record_managers(self) -> "UserQuerySet": """ Returns a QuerySet of users that have the permission to start a destruction list. """ - permission = Permission.objects.get(codename="can_start_destruction") + try: + permission = Permission.objects.get(codename="can_start_destruction") + except Permission.DoesNotExist: + # Rare occasion where permissions are not yet migrated? + return self.none() return self._users_with_permission(permission) def reviewers(self) -> "UserQuerySet":