Skip to content

Commit 9b4a8c4

Browse files
Merge pull request #95 from mobidata-bw/nextbike_vehicle_availabilities_fix
avoid exception in update_stations_availability_status
2 parents b73f5fc + 9b63aca commit 9b4a8c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/converters/gbfs_nextbike_vehicle_availabilities.py

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def _convert_station_status(self, system_id: str, data: dict, path: str) -> dict
5959
return data
6060

6161
vehicles = self.free_vehicles_cache_per_system.get(system_id, [])
62+
if len(vehicles) == 0: # _convert_free_vehicles_status has not yet been called for this system_id
63+
return data
6264

6365
update_stations_availability_status(data['data']['stations'], vehicles)
6466

0 commit comments

Comments
 (0)