Skip to content

Commit

Permalink
fix: Optimize evaluation handling by directly updating last evaluatio…
Browse files Browse the repository at this point in the history
…n for locked edits
  • Loading branch information
albertoleoncio committed Nov 19, 2024
1 parent 49a0a32 commit b4679d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions contests/handlers/triage.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,12 @@ def unhold_edit(self):
)

for locked in lockeds:
diff = Edit.objects.get(contest=self.contest, diff=locked.diff)
evaluation = Evaluation.objects.create(
contest=self.contest,
diff=diff,
diff=Edit.objects.get(contest=self.contest, diff=locked.diff),
status='0' # Status '0' indicates the edit is pending
)
diff.update(last_evaluation=evaluation)
Edit.objects.filter(contest=self.contest, diff=locked.diff).update(last_evaluation=evaluation)

return lockeds

Expand Down

0 comments on commit b4679d7

Please sign in to comment.