Merge pull request 'sort vehicles by last activity' (#12) from sort_vehicles_by_last_entry_2 into main
Reviewed-on: #12
This commit is contained in:
commit
69f077a0f5
|
@ -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 ), reverse=True)
|
||||
|
||||
return render_template("pitstops.html", user=user)
|
||||
|
|
Loading…
Reference in New Issue