Fix issue when VIN is provided (#834)

This commit is contained in:
Andreas Linde 2021-04-05 11:08:37 +02:00 • committed by GitHub
parent 711ec8357d
commit 33dc71938e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,7 +220,7 @@ func (v *Identity) FindVehicle(accessTokens AccessTokens, vin string) (Vehicle,
var foundVehicle VehicleResponse
var foundEmobilityVehicle bool
if err == nil && vin == "" {
if err == nil {
if vin == "" && len(vehicles) == 1 {
foundVehicle = vehicles[0]
} else {