From 2233474c89f1690fbe6c03a9bdc17ee20918d64e Mon Sep 17 00:00:00 2001 From: Danhia Date: Fri, 1 Jul 2022 23:51:36 +0200 Subject: [PATCH] hotfix for solo events --- src/events/views/events.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/events/views/events.py b/src/events/views/events.py index 16b2db4..72d3587 100644 --- a/src/events/views/events.py +++ b/src/events/views/events.py @@ -166,8 +166,9 @@ def submit_event_flag(request, event_slug, chall_slug): if ev.team_size > 1 and player.team is None: response['Location'] += '?NoTeam=1' return response - if ev.team_size == 1 and CTF_flags.objects.filter(user=request.user, ctf=ctf_info): - flagged = True + if ev.team_size == 1: + if CTF_flags.objects.filter(user=request.user, ctf=ctf_info): + flagged = True else: solved_list = CTF_flags.objects.filter(ctf=ctf_info) for s in solved_list: