diff --git a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsFreeVehicleStatusMapper.java b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsFreeVehicleStatusMapper.java index 00e99030c45..44bcee84580 100644 --- a/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsFreeVehicleStatusMapper.java +++ b/application/src/main/java/org/opentripplanner/updater/vehicle_rental/datasources/GbfsFreeVehicleStatusMapper.java @@ -83,14 +83,12 @@ public VehicleRentalVehicle mapFreeVehicleStatus(GBFSBike vehicle) { vehicle.getCurrentRangeMeters(), e.getMessage() ); - // if the propulsion type has an engine current_range_meters is required - if ( - vehicle.getVehicleTypeId() != null && - vehicleTypes.get(vehicle.getVehicleTypeId()).propulsionType != - RentalVehicleType.PropulsionType.HUMAN - ) { - return null; - } + } + // if the propulsion type has an engine current_range_meters is required + if (vehicle.getVehicleTypeId() != null + && vehicleTypes.get(vehicle.getVehicleTypeId()).propulsionType != RentalVehicleType.PropulsionType.HUMAN + && rangeMeters == null) { + return null; } rentalVehicle.fuel = new RentalVehicleFuel(fuelPercent, rangeMeters); rentalVehicle.pricingPlanId = vehicle.getPricingPlanId();