From 24c0b4c2152cb2f68af0c0f9393d7febc4008237 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Sat, 25 May 2024 13:12:23 +0200 Subject: [PATCH] first try --- app/routes/pitstop.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/routes/pitstop.py b/app/routes/pitstop.py index dde6742..589b0b5 100644 --- a/app/routes/pitstop.py +++ b/app/routes/pitstop.py @@ -226,5 +226,6 @@ def get_pit_stops(): "regulars": vehicle.regulars, } user["vehicles"].append(v) + user["vehicles"].sort(key=lambda v: (v.data[-1].date, v.data[-1].odometer or 0 )) return render_template("pitstops.html", user=user)