Skip to content

Commit

Permalink
fix: Update evaluation handling to use fetched diff object
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoleoncio committed Nov 19, 2024
1 parent 2bddcd9 commit 49a0a32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contests/handlers/triage.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,13 @@ 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=locked.diff,
diff=diff,
status='0' # Status '0' indicates the edit is pending
)
Edit.objects.filter(contest=self.contest, diff=locked.diff).update(last_evaluation=evaluation)
diff.update(last_evaluation=evaluation)

return lockeds

Expand Down

0 comments on commit 49a0a32

Please sign in to comment.