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