Skip to content

Commit

Permalink
Handle N/A choice in CSV file
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Dec 3, 2023
1 parent 9236fc8 commit 66a12d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/components/Projects/ProjectTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ const mapCsvRules = (project, rules) => {

const ruleValues = columnData.flatMap(rule => {
if (rule.dataType === "choice") {
return rule.choices.map(choice => (choice.id == rule.value ? "Y" : "N"));
return rule.choices.map(choice =>
choice.id == rule.value || (choice.id == 0 && !rule.value) ? "Y" : "N"
);
} else {
return rule.value ? rule.value.toString() : "";
}
Expand Down

0 comments on commit 66a12d3

Please sign in to comment.