From 37cef75fefb4c792ae280905e9fc0f0843f4c051 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 23 Nov 2022 12:27:11 -0800 Subject: [PATCH] IO-2098 Fix vin search bug on job import. --- .../jobs-available-table/jobs-available-table.container.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/jobs-available-table/jobs-available-table.container.jsx b/client/src/components/jobs-available-table/jobs-available-table.container.jsx index 1287e288c..1aba56a47 100644 --- a/client/src/components/jobs-available-table/jobs-available-table.container.jsx +++ b/client/src/components/jobs-available-table/jobs-available-table.container.jsx @@ -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, }, }); }