Skip to content

Commit

Permalink
Remove creating db object when user has alr submitted.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Apr 6, 2024
1 parent cc8b389 commit 33f4e5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gameserver/views/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ def form_valid(self, form):
and not self.request.participation.has_solved(self.contest_object)
):
messages.success(self.request, "Your flag is correct!")
self._create_submission_object(form, is_correct=True)
else:
messages.info(
self.request, "Your flag is correct, but you have already solved this problem."
)
self._create_submission_object(form, is_correct=True)
return super().form_valid(form)

def form_invalid(self, form):
Expand Down

0 comments on commit 33f4e5e

Please sign in to comment.