Include current trip in future list

This commit is contained in:
Edward Betts 2024-05-18 12:14:34 +02:00
parent afb96bc855
commit c9fcf1d5e7

View file

@ -311,6 +311,12 @@ def trip_future_list() -> str:
trip_list = get_trip_list(route_distances)
today = date.today()
current = [
item
for item in trip_list
if item.start <= today and (item.end or item.start) >= today
]
future = [item for item in trip_list if item.start > today]
coordinates, routes = agenda.trip.get_coordinates_and_routes(future)
@ -318,7 +324,7 @@ def trip_future_list() -> str:
return flask.render_template(
"trip/list.html",
heading="Future trips",
trips=future,
trips=current + future,
coordinates=coordinates,
routes=routes,
today=today,