From 9f753a049e6413b930a7a031855b0d2e6f0e6f92 Mon Sep 17 00:00:00 2001 From: dhanush-2397 Date: Thu, 21 Sep 2023 11:34:43 +0530 Subject: [PATCH] NAS program bug resolved --- src/ingestion/services/nvsk-api/nvsk-api.service.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ingestion/services/nvsk-api/nvsk-api.service.ts b/src/ingestion/services/nvsk-api/nvsk-api.service.ts index 0c65f29..ff36630 100644 --- a/src/ingestion/services/nvsk-api/nvsk-api.service.ts +++ b/src/ingestion/services/nvsk-api/nvsk-api.service.ts @@ -74,6 +74,13 @@ export class NvskApiService { } if (row['state_code'].slice(1, -1) === process.env.STATE_ID) { + for (const key in row) { + if (Object.hasOwnProperty.call(row, key)) { + const originalValue = row[key]; + const modifiedValue = originalValue.includes(',') ? `"${originalValue}"` : originalValue; + row[key] = modifiedValue; + } + } filteredCsvStream.write(Object.values(row).join(',') + '\n'); } })