Skip to content

Commit

Permalink
Merge pull request #711 from bigcapitalhq/fix-parse-non-lowercase-import
Browse files Browse the repository at this point in the history
fix: Parse the uppercase values in importing
  • Loading branch information
abouolia authored Oct 14, 2024
2 parents fd4d86e + 321af8c commit eeedb78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/server/src/services/Import/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export const valueParser =
// Parses the enumeration value.
} else if (field.fieldType === 'enumeration') {
const option = get(field, 'options', []).find(
(option) => option.label === value
(option) => option.label?.toLowerCase() === value?.toLowerCase()
);
_value = get(option, 'key');
// Parses the numeric value.
Expand Down Expand Up @@ -433,8 +433,8 @@ export const getMapToPath = (to: string, group = '') =>
group ? `${group}.${to}` : to;

export const getImportsStoragePath = () => {
return path.join(global.__storage_dir, `/imports`);
}
return path.join(global.__storage_dir, `/imports`);
};

/**
* Deletes the imported file from the storage and database.
Expand Down

0 comments on commit eeedb78

Please sign in to comment.