diff --git a/web_view.py b/web_view.py index fb65c7b..7f6f555 100755 --- a/web_view.py +++ b/web_view.py @@ -486,13 +486,15 @@ def get_prev_current_and_next_trip( """Get previous trip, this trip and next trip.""" trip_iter = iter(trip_list) prev_trip = None + current_trip = None for trip in trip_iter: if trip.start.isoformat() == start: + current_trip = trip break prev_trip = trip next_trip = next(trip_iter, None) - return (prev_trip, trip, next_trip) + return (prev_trip, current_trip, next_trip) @app.route("/trip/")