Skip to content

Commit

Permalink
Fixnute prenahravanie rieseni
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed Apr 13, 2024
1 parent b5d75ec commit 0566c43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions competition/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,11 @@ def upload_solution(self, request, pk=None):
if len(existing_solutions) > 0 and late_tag is not None and not late_tag.can_resubmit:
raise exceptions.ValidationError(
detail='Túto úlohu už nie je možné odovzdať znova.')
for solution in existing_solutions:
solution.solution.delete()
Solution.objects.filter(
problem=problem, semester_registration=event_registration).delete()

solution = Solution.objects.create(
problem=problem,
semester_registration=event_registration,
Expand Down

0 comments on commit 0566c43

Please sign in to comment.