Skip to content

Commit

Permalink
update commments
Browse files Browse the repository at this point in the history
  • Loading branch information
abrantesarthur committed Jan 16, 2025
1 parent 34de61b commit 4deaa2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/oneTrust/helpers/oneTrustAssessmentToCsvRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export const oneTrustAssessmentToCsvRecord = (
// flatten the assessment object so it does not have nested properties
const flatAssessment = flattenOneTrustAssessment(assessment);

// transform the flat assessment to have all CSV keys in the expected order
/**
* transform the flat assessment to:
* 1. have every possible header. This is how the backend can tell it's a CLI, not Dashboard, import.
* 2. have the headers in the same order. This is fundamental for constructing a CSV file.
*/
const flatAssessmentFull = Object.fromEntries(
DEFAULT_ONE_TRUST_ASSESSMENT_CSV_HEADER.map((header) => {
const value = flatAssessment[header] ?? '';
Expand Down

0 comments on commit 4deaa2d

Please sign in to comment.