Skip to content

Commit

Permalink
fix: lock tournament winner submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
alanzhu0 committed Sep 27, 2024
1 parent 539c937 commit 58b35e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion othello/apps/games/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def latest(self, **kwargs: Any) -> "models.query.QuerySet[Submission]":
"""
Returns a set of all the latest submissions for all users
"""
return self.filter(**kwargs).distinct("user").order_by("user", "-created_at")
return self.filter(**kwargs).distinct("user").order_by("user", "-tournament_win_year", "-created_at")


class Submission(models.Model):
Expand Down

0 comments on commit 58b35e3

Please sign in to comment.