From be60601f26cbedfdb01de964f1587900f4190bef Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Sat, 25 May 2024 13:15:16 +0200 Subject: [PATCH] second try --- app/routes/pitstop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/pitstop.py b/app/routes/pitstop.py index 589b0b5..8eaaf7b 100644 --- a/app/routes/pitstop.py +++ b/app/routes/pitstop.py @@ -226,6 +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 )) + user["vehicles"].sort(key=lambda v: (v["data"][-1].date, v["data"][-1].odometer or 0 )) return render_template("pitstops.html", user=user)