Skip to content

Commit

Permalink
fix: add queryset ordering to matches_by_date
Browse files Browse the repository at this point in the history
- StageGroup
- Team
  • Loading branch information
goodtune committed May 5, 2024
1 parent 296295c commit bb6cbfa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tournamentcontrol/competition/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,14 @@ def matches_by_date(self):
"home_team__division",
"away_team__club",
"away_team__division",
).order_by(
"date",
"stage",
"round",
"is_bye",
"time",
"play_at__ground__order",
"pk",
)
for match in matches.annotate(
statistics_count=Count("statistics"),
Expand Down Expand Up @@ -1287,6 +1295,14 @@ def matches_by_date(self):
"home_team__division",
"away_team__club",
"away_team__division",
).order_by(
"date",
"stage",
"round",
"is_bye",
"time",
"play_at__ground__order",
"pk",
)
for m in matches.annotate(
statistics_count=Count("statistics"), videos_count=Count("videos")
Expand Down

0 comments on commit bb6cbfa

Please sign in to comment.