diff --git a/django_server/application_evaluator/management/commands/email_users_3rd_round.py b/django_server/application_evaluator/management/commands/email_users_3rd_round.py index 0656eaf..4d760ba 100644 --- a/django_server/application_evaluator/management/commands/email_users_3rd_round.py +++ b/django_server/application_evaluator/management/commands/email_users_3rd_round.py @@ -108,6 +108,12 @@ def handle(self, *args, **options): exit(1) doc_link = doc_dict[application_round_id] ar = ApplicationRound.objects.get(name__startswith=application_round_id) + if ar.applications.count() == 0: + print(f"Application round {application_round_id} has no applications") + exit(1) + if ar.admin is None: + print(f"Application round {application_round_id} has no admin") + exit(1) ar_admin = ar.admin ar_jury = ar.evaluators.all() vars = {