Fix fetching BB_reference arrays
This commit is contained in:
parent
b3ff417844
commit
ab647d1f0f
1 changed files with 4 additions and 1 deletions
|
@ -104,7 +104,10 @@ export function basicProcessing({
|
|||
|
||||
export function fixArrayTypes(row: Row, table: Table) {
|
||||
for (let [fieldName, schema] of Object.entries(table.schema)) {
|
||||
if (schema.type === FieldType.ARRAY && typeof row[fieldName] === "string") {
|
||||
if (
|
||||
[FieldType.ARRAY, FieldType.BB_REFERENCE].includes(schema.type) &&
|
||||
typeof row[fieldName] === "string"
|
||||
) {
|
||||
try {
|
||||
row[fieldName] = JSON.parse(row[fieldName])
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in a new issue