Merged in feature/IO-2801-os-loader-bills-data (pull request #1456)

IO-2801 os-loader bills data

Approved-by: Dave Richer
This commit is contained in:
Allan Carr
2024-06-03 18:59:08 +00:00
committed by Dave Richer

View File

@@ -174,10 +174,7 @@ async function OpenSearchUpdateHandler(req, res) {
const bulkOperation = []; const bulkOperation = [];
slicedArray.forEach((bill) => { slicedArray.forEach((bill) => {
bulkOperation.push({ index: { _index: "bills", _id: bill.id } }); bulkOperation.push({ index: { _index: "bills", _id: bill.id } });
bulkOperation.push({ bulkOperation.push({ ...bill, bodyshopid: bill.job.bodyshopid });
...omit(bill, ["job"]),
bodyshopid: bill.job.bodyshopid
});
}); });
promiseQueue.push(bulkOperation); promiseQueue.push(bulkOperation);
} }