From 6b7ed0dbb5876e205b603905d54e761f0389cab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sun, 15 Jan 2023 23:20:43 +0100 Subject: [PATCH] Order by timestamp_start from the newest --- src/web/tracker/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/tracker/views.py b/src/web/tracker/views.py index 042b932..4ce6550 100644 --- a/src/web/tracker/views.py +++ b/src/web/tracker/views.py @@ -66,7 +66,7 @@ def list_sessions(request, filter="", purchase_id="", platform_id="", game_id="" dataset = Session.objects.filter(purchase__game=game_id) context["game"] = Platform.objects.get(id=game_id) else: - dataset = Session.objects.all().order_by("timestamp_start") + dataset = Session.objects.all().order_by("-timestamp_start") for session in dataset: if session.timestamp_end == None and session.duration_manual.seconds == 0: