Skip to content

Commit

Permalink
Fixnute prenahravanie rieseni (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe authored Apr 13, 2024
1 parent dcc1cd5 commit f8a6833
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 @@ -271,8 +271,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 f8a6833

Please sign in to comment.