Added json parse option for row import attachment values
This commit is contained in:
parent
2cbae832c4
commit
56a1b068cc
1 changed files with 11 additions and 0 deletions
|
@ -70,6 +70,17 @@ export const TYPE_TRANSFORM_MAP: any = {
|
||||||
"": [],
|
"": [],
|
||||||
[null]: [],
|
[null]: [],
|
||||||
[undefined]: undefined,
|
[undefined]: undefined,
|
||||||
|
parse: (attachments) => {
|
||||||
|
if(typeof attachments === "string"){
|
||||||
|
let result = attachments
|
||||||
|
try {
|
||||||
|
result = JSON.parse(attachments)
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Could not parse attachments", e)
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[FieldTypes.BOOLEAN]: {
|
[FieldTypes.BOOLEAN]: {
|
||||||
"": null,
|
"": null,
|
||||||
|
|
Loading…
Reference in a new issue