IO-2098 Fix vin search bug on job import.

This commit is contained in:
Patrick Fic
2022-11-23 12:27:11 -08:00
parent 7301d9da85
commit 37cef75fef

View File

@@ -112,12 +112,12 @@ export function JobsAvailableContainer({
).data;
let existingVehicles;
if (estData.est_data.vehicle && estData.est_data.vin) {
if (estData.est_data.v_vin) {
//There's vehicle data, need to double check the VIN.
existingVehicles = await client.query({
query: SEARCH_VEHICLE_BY_VIN,
variables: {
vin: estData.est_data.vehicle.data.v_vin,
vin: estData.est_data.v_vin || estData.est_data.vehicle.data.v_vin,
},
});
}