Order homepage sessions from newest

This commit is contained in:
Lukáš Kucharczyk 2023-01-31 16:37:44 +01:00
parent b45889fd85
commit 6790c434f7
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ def list_sessions(request, filter="", purchase_id="", platform_id="", game_id=""
elif filter == "recent":
dataset = Session.objects.filter(
timestamp_start__gte=datetime.now() - timedelta(days=30)
)
).order_by("-timestamp_start")
context["title"] = "Last 30 days"
else:
# by default, sort from newest to oldest