Skip to content

Commit

Permalink
Merge pull request #282 from dhanush-2397/dev
Browse files Browse the repository at this point in the history
NAS program quotes issue resolved
  • Loading branch information
htvenkatesh authored Sep 21, 2023
2 parents 8fa5684 + a636f60 commit 6fd85bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ingestion/services/nvsk-api/nvsk-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
})
Expand Down

0 comments on commit 6fd85bb

Please sign in to comment.