hotfix for solo events #63

Merged
Danhia merged 1 commits from Danhia/website:fix-event into main 2022-07-01 23:57:17 +02:00
1 changed files with 3 additions and 2 deletions

View File

@ -166,7 +166,8 @@ 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):
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)