removed start challenge button when event is over

This commit is contained in:
Danhia 2022-02-14 19:18:00 +01:00
parent 901c73a4f2
commit 5eec76dd00
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ def chall_event_info(request, event_slug, chall_slug):
return redirect('events:event_info', event_slug=event_slug) return redirect('events:event_info', event_slug=event_slug)
elif not request.user.is_authenticated: elif not request.user.is_authenticated:
return redirect('accounts:signin') return redirect('accounts:signin')
if request.GET.get('EventIsOver'): if request.GET.get('EventIsOver') or timezone.now() > event_info.end_date:
eventisover = True eventisover = True
if request.GET.get('AlreadyFlagged'): if request.GET.get('AlreadyFlagged'):
alreadyflag = True alreadyflag = True