1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 06:22:22 +00:00

Fix solution upload

This commit is contained in:
Yohann D'ANELLO 2021-04-03 22:15:03 +02:00
parent d4c7b39f46
commit 4084f7abb5
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -573,7 +573,7 @@ class SolutionUploadView(LoginRequiredMixin, FormView):
problem=form_sol.problem, problem=form_sol.problem,
final_solution=self.participation.final) final_solution=self.participation.final)
tournament = Tournament.final_tournament() if self.participation.final else self.participation.final tournament = Tournament.final_tournament() if self.participation.final else self.participation.tournament
if timezone.now() > tournament.solution_limit and sol_qs.exists(): if timezone.now() > tournament.solution_limit and sol_qs.exists():
form.add_error(None, _("You can't upload a solution after the deadline.")) form.add_error(None, _("You can't upload a solution after the deadline."))
return self.form_invalid(form) return self.form_invalid(form)