Skip to content

Commit

Permalink
removed checking for commas in associated program and subprogarm fields
Browse files Browse the repository at this point in the history
  • Loading branch information
per305 authored and per305 committed Dec 20, 2021
1 parent b553756 commit 88908e8
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scripts/RestClient/nesp/tropical/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,11 @@ for(var i = 1; i < csvRows.length; i++) {
project.name = fields[projectName]
}

if(fields[associatedProgram].indexOf(',') != -1){
var tempAssociatedProgram = fields[associatedProgram].replace(/""/g, '"');;
project.associatedProgram = tempAssociatedProgram.substring(1, tempAssociatedProgram.length-1);
}
else {
if(fields[associatedProgram]){
project.associatedProgram = fields[associatedProgram]
}

if(fields[associatedSubProgram].indexOf(',') != -1){
var tempAssociatedSubProgram = fields[associatedSubProgram].replace(/""/g, '"');;
project.associatedSubProgram = tempAssociatedSubProgram.substring(1, tempAssociatedSubProgram.length-1);
}
else {
if(fields[associatedSubProgram]){
project.associatedSubProgram = fields[associatedSubProgram]
}

Expand Down

1 comment on commit 88908e8

@temi
Copy link
Contributor

@temi temi commented on 88908e8 Dec 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed

Please sign in to comment.