Skip to content

Commit 3963a55

Browse files
avoid exception in update_stations_availability_status
1 parent 314a15d commit 3963a55

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 not vehicles: # _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)