Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failed checks on master #454

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions lib/DataHarmonizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1757,17 +1757,27 @@ class DataHarmonizer {

// if sources exist, fetch transformed Value
if (field.sources) {
if (field.multivalued === true) { //Map list of semicolon-delimited choices
if (field.multivalued === true) {
// Map list of semicolon-delimited choices
// ISSUE: relying on semicolon delimiter in input
for (let cellVal of mappedCellVal.split(';')) {
mappedCell.push( self.getTransformedField(headerName, cellVal.trim(), field, prefix));
mappedCell.push(
self.getTransformedField(
headerName,
cellVal.trim(),
field,
prefix
)
);
}
} else {
// Map single choice
mappedCell.push(
self.getTransformedField(headerName, mappedCellVal, field, prefix)
);
}
else { // Map single choice
mappedCell.push(self.getTransformedField(headerName, mappedCellVal, field, prefix));
}
}
else { // No mapping.
} else {
// No mapping.
mappedCell.push(mappedCellVal);
}
}
Expand Down
4 changes: 1 addition & 3 deletions lib/Validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ class Validator {
this.#valueValidatorMap = new Map();
}


/* This returns a single primitve data type for a slot - a decimal, date,
string etc. or possibly an enumeration. Enumerations are handled
separately however (by const slotEnum = ...). Slots either use "range"
Expand All @@ -150,7 +149,6 @@ class Validator {
may be undefined if that is a menu too.
*/
getSlotType(slotDefinition) {

var slotType = this.#schema.types?.[slotDefinition.range];

if (slotType === undefined) {
Expand All @@ -163,7 +161,7 @@ class Validator {
}
}

return slotType
return slotType;
}

getValidatorForSlot(slot, options = {}) {
Expand Down
Loading