This commit is contained in:
@ -85,7 +85,8 @@ def list_sessions(request, filter="", purchase_id="", platform_id="", game_id=""
|
||||
# cannot use dataset[0] here because that might be only partial QuerySet
|
||||
context["last"] = Session.objects.all().order_by("timestamp_start").last()
|
||||
# charts are always oldest->newest
|
||||
context["chart"] = playtime_over_time_chart(dataset.order_by("timestamp_start"))
|
||||
if Session.objects.count() >= 2:
|
||||
context["chart"] = playtime_over_time_chart(dataset.order_by("timestamp_start"))
|
||||
|
||||
return render(request, "list_sessions.html", context)
|
||||
|
||||
|
Reference in New Issue
Block a user