Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicles are skipped if optional pricing_plan_id is not not set #396

Closed
hbruch opened this issue Mar 26, 2024 · 1 comment · Fixed by #397
Closed

Vehicles are skipped if optional pricing_plan_id is not not set #396

hbruch opened this issue Mar 26, 2024 · 1 comment · Fixed by #397
Labels
bug Something isn't working

Comments

@hbruch
Copy link
Collaborator

hbruch commented Mar 26, 2024

Expected behavior

Vehicles with property pricing_plan_id not explicitly set should not be skipped, as the vehicle type references by vehicle_type_id needs to declare a default_pricing_plan_id, which applies in such a case (see spec GBFSv2.3).

Observed behavior

They are skipped (VehicleFilter assumes getPricingPlanId() returns a non null value).

Version of lamassu used (exact commit hash or JAR name)

28b90d3

Data sets in use (links to GBFS feeds)

e.g. https://stables.donkey.bike/api/public/gbfs/2/donkey_yverdon-les-bains/gbfs.json

@testower
Copy link
Collaborator

testower commented Mar 26, 2024

Nice catch. This probably means we also need to account for that case in the vehicle mapping:

.map(vehicle ->
vehicleMapper.mapVehicle(
vehicle,
vehicleTypes.get(vehicle.getVehicleTypeId()),
pricingPlans.get(vehicle.getPricingPlanId()),
system
)
)

@testower testower added this to the 1.1 (next release) milestone Mar 26, 2024
@testower testower added the bug Something isn't working label Mar 26, 2024
hbruch added a commit to mobidata-bw/lamassu that referenced this issue Mar 26, 2024
hbruch added a commit to mobidata-bw/lamassu that referenced this issue Mar 27, 2024
testower added a commit that referenced this issue Mar 27, 2024
fix: do not skip vehicles without pricing plan id (fixes #396)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants