Skip to content

Commit

Permalink
Add empty vehicle_types_availble if no vehicle
Browse files Browse the repository at this point in the history
  • Loading branch information
hbruch committed Aug 14, 2023
1 parent c7a1c99 commit 38fa0b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions x2gbfs/gbfs/gbfs_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ def _update_stations_availability_status(self, status_map, vehicles_map):
def _update_station_availability_status(self, vt_available, station_status):
num_bikes_available = sum([vt['count'] for vt in vt_available])
station_status['num_bikes_available'] = num_bikes_available
if num_bikes_available > 0:
station_status['vehicle_types_available'] = vt_available
station_status['vehicle_types_available'] = vt_available
1 change: 1 addition & 0 deletions x2gbfs/providers/deer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def create_station_status(self, station_id: str, last_reported: int):
'is_installed': True,
'is_returning': True,
'station_id': station_id,
'vehicle_types_available': [],
'last_reported': last_reported,
}

Expand Down

0 comments on commit 38fa0b9

Please sign in to comment.