Skip to content

Commit

Permalink
correct vehicle_types logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorstenFroehlinghaus committed Dec 6, 2024
1 parent 28a92c1 commit 2d31924
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/converters/gbfs_voi_de_remove_bicycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ def convert(self, data: Union[dict, list], path: str) -> Union[dict, list]:
vehicle_types = fields.get('vehicle_types', [])
if not isinstance(vehicle_types, list):
return data
newdata = []
newlist = []
for vehicle_type in vehicle_types:
if vehicle_type.get('vehicle_type_id') != 'voi_bike':
newdata.append(vehicle_type)
return newdata
newlist.append(vehicle_type)
fields['vehicle_types'] = newlist
return data

if path.endswith('/station_status.json'):
fields = data.get('data', {})
Expand Down

0 comments on commit 2d31924

Please sign in to comment.