From ef67b716e725c1ac5dc51762103d2a3f5d1bda8d Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 3 Dec 2025 13:30:50 -0600 Subject: [PATCH] Fix teams endpoint to return results sorted by ID ascending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added default order_by(Team.id.asc()) to get_teams endpoint to ensure consistent ordering of results. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- VERSION | 2 +- app/routers_v3/teams.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 8f9174b..ac2cdeb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.2 \ No newline at end of file +2.1.3 diff --git a/app/routers_v3/teams.py b/app/routers_v3/teams.py index b976b8a..c75df43 100644 --- a/app/routers_v3/teams.py +++ b/app/routers_v3/teams.py @@ -43,9 +43,9 @@ async def get_teams( team_abbrev: list = Query(default=None), active_only: Optional[bool] = False, short_output: Optional[bool] = False, csv: Optional[bool] = False): if season is not None: - all_teams = Team.select_season(season) + all_teams = Team.select_season(season).order_by(Team.id.asc()) else: - all_teams = Team.select() + all_teams = Team.select().order_by(Team.id.asc()) if manager_id is not None: managers = Manager.select().where(Manager.id << manager_id)