From fff79bf883dffb50300ec86d15c17c2daa2f2691 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Wed, 7 Aug 2024 21:08:18 -0700 Subject: [PATCH] Specify sort-order for deck-detail page --- app/routers/decks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/routers/decks.py b/app/routers/decks.py index 75a36bf..cf69de4 100644 --- a/app/routers/decks.py +++ b/app/routers/decks.py @@ -141,6 +141,7 @@ def _build_deck_score_history(deck_id: str, db: Session): .filter( or_(*[getattr(models.Game, f"deck_id_{i+1}") == deck_id for i in range(6)]) ) + .order_by(models.Game.date, models.Game.id) .all() ) # Having found the games, then add the score for this deck after that game