Compare commits

..

3 Commits

Author SHA1 Message Date
jlusiardi 69f077a0f5 Merge pull request 'sort vehicles by last activity' (#12) from sort_vehicles_by_last_entry_2 into main
Reviewed-on: #12
2024-05-25 21:51:28 +02:00
Joachim Lusiardi dfb07ae7ee sort vehicles by last activity 2024-05-25 17:53:51 +02:00
Joachim Lusiardi 208cb497aa remove the plan pitstop feature
Co-authored-by: Joachim Lusiardi <joachim@lusiardi.de>
Co-committed-by: Joachim Lusiardi <joachim@lusiardi.de>
2024-05-22 11:50:43 +02:00
1 changed files with 1 additions and 0 deletions

View File

@ -226,5 +226,6 @@ def get_pit_stops():
"regulars": vehicle.regulars, "regulars": vehicle.regulars,
} }
user["vehicles"].append(v) user["vehicles"].append(v)
user["vehicles"].sort(key=lambda v: (v["data"][-1].date, v["data"][-1].odometer or 0 ), reverse=True)
return render_template("pitstops.html", user=user) return render_template("pitstops.html", user=user)