Specify sort-order for deck-detail page

This commit is contained in:
Jack Jackson 2024-08-07 21:08:18 -07:00
parent c874de3a4c
commit fff79bf883

View File

@ -141,6 +141,7 @@ def _build_deck_score_history(deck_id: str, db: Session):
.filter( .filter(
or_(*[getattr(models.Game, f"deck_id_{i+1}") == deck_id for i in range(6)]) 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() .all()
) )
# Having found the games, then add the score for this deck after that game # Having found the games, then add the score for this deck after that game