Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
refactor(apps/tasks): variable names describe better what they store
Browse files Browse the repository at this point in the history
  • Loading branch information
thegm445 committed Dec 2, 2023
1 parent 183c3ef commit 25d1bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/tasks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def handle_submission(code: str, task_id: int, submission_id: int) -> None:
submission.status = "AC" if output == task.output_file else "WA"
submission.save()

has_been_accepted = (
has_already_scored = (
Submission._default_manager.filter(
author=submission.author,
task=task,
Expand All @@ -61,7 +61,7 @@ def handle_submission(code: str, task_id: int, submission_id: int) -> None:

if (
submission.status == SubmissionStatus.ACCEPTED
and not has_been_accepted
and not has_already_scored
):
submission.author.score += task.score
submission.author.save()
Expand Down

0 comments on commit 25d1bd1

Please sign in to comment.