Fix wrong playrange ordering

This commit is contained in:
Lukáš Kucharczyk 2023-11-15 10:40:52 +01:00
parent e158bc0623
commit 4720660cff
1 changed files with 3 additions and 1 deletions

View File

@ -155,7 +155,9 @@ def view_game(request, game_id=None):
.order_by("year_released")
)
sessions = Session.objects.filter(purchase__edition__game=game)
sessions = Session.objects.filter(purchase__edition__game=game).order_by(
"timestamp_start"
)
session_count = sessions.count()
playrange_start = sessions.first().timestamp_start.strftime("%b %Y")