Fix import/export
This commit is contained in:
parent
a4c8fcb2ac
commit
7d0090a8e2
|
@ -54,7 +54,7 @@ export function validate(rows: Rows, schema: TableSchema): ValidationResults {
|
||||||
type: columnType,
|
type: columnType,
|
||||||
subtype: columnSubtype,
|
subtype: columnSubtype,
|
||||||
autocolumn: isAutoColumn,
|
autocolumn: isAutoColumn,
|
||||||
} = schema[columnName]
|
} = schema[columnName] || {}
|
||||||
|
|
||||||
// If the column had an invalid value we don't want to override it
|
// If the column had an invalid value we don't want to override it
|
||||||
if (results.schemaValidation[columnName] === false) {
|
if (results.schemaValidation[columnName] === false) {
|
||||||
|
@ -147,6 +147,12 @@ export function parse(rows: Rows, schema: TableSchema): Rows {
|
||||||
utils.unreachable(columnSubtype)
|
utils.unreachable(columnSubtype)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (
|
||||||
|
(columnType === FieldType.ATTACHMENTS ||
|
||||||
|
columnType === FieldType.ATTACHMENT_SINGLE) &&
|
||||||
|
typeof columnData === "string"
|
||||||
|
) {
|
||||||
|
parsedRow[columnName] = parseCsvExport(columnData)
|
||||||
} else {
|
} else {
|
||||||
parsedRow[columnName] = columnData
|
parsedRow[columnName] = columnData
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue