Fix GTFS variable type mismatch (#22624)

pull/22638/head
René-Marc Simard 2019-04-01 13:49:53 -04:00 committed by Robbie Trencheny
parent ab2ac60d12
commit 1ce622469d
1 changed files with 2 additions and 3 deletions

View File

@ -268,9 +268,8 @@ def get_next_departure(schedule: Any, start_station_id: Any,
timetable[idx] = {**row, **extras}
# Flag last departures.
for idx in [yesterday_last, today_last]:
if idx is not None:
timetable[idx]['last'] = True
for idx in filter(None, [yesterday_last, today_last]):
timetable[idx]['last'] = True
_LOGGER.debug("Timetable: %s", sorted(timetable.keys()))