diff --git a/breathecode/assignments/management/commands/schedule_repository_deletions.py b/breathecode/assignments/management/commands/schedule_repository_deletions.py index 5fbd63dd9..4a2f4eaa2 100644 --- a/breathecode/assignments/management/commands/schedule_repository_deletions.py +++ b/breathecode/assignments/management/commands/schedule_repository_deletions.py @@ -275,6 +275,9 @@ def schedule_github_deletions(self, organization: str, last_check: Optional[date self.schedule_github_deletion("GITHUB", user, repo_name) def schedule_github_deletion(self, provider: str, user: str, repo_name: str): + if user not in self.allowed_users: + return + if RepositoryWhiteList.objects.filter( provider=provider, repository_user=user, repository_name=repo_name ).exists():