Skip to content

Commit 0b3798d

Browse files
committed
fix: change match ordering to desc=True for better season distribution
- Changed from oldest-first (desc=False) to newest-first (desc=True) - This provides better distribution across all months in the season - With 5000 limit and newest-first, we get comprehensive coverage from recent months back to season start - Fixes Match Distribution chart showing only September 2024
1 parent c764796 commit 0b3798d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/api/dashboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ async def get_dashboard_matches(
9292
if league:
9393
query = query.eq('div', league)
9494

95-
# Fetch data ordered by oldest first to ensure full season coverage
96-
# (instead of just most recent matches)
97-
response = query.order('match_date', desc=False).limit(limit).execute()
95+
# Fetch data ordered by newest first for better distribution across season
96+
# With desc=True and high limit (5000), we get good coverage of all months
97+
response = query.order('match_date', desc=True).limit(limit).execute()
9898

9999
if response.data:
100100
# Cache the result

0 commit comments

Comments
 (0)