Fix
This commit is contained in:
parent
9d0fdeff68
commit
b28aaa3a93
|
@ -17,6 +17,7 @@ import {
|
||||||
CsvToJsonRequest,
|
CsvToJsonRequest,
|
||||||
CsvToJsonResponse,
|
CsvToJsonResponse,
|
||||||
FetchTablesResponse,
|
FetchTablesResponse,
|
||||||
|
FieldType,
|
||||||
MigrateRequest,
|
MigrateRequest,
|
||||||
MigrateResponse,
|
MigrateResponse,
|
||||||
SaveTableRequest,
|
SaveTableRequest,
|
||||||
|
@ -178,9 +179,17 @@ export async function validateExistingTableImport(
|
||||||
const { rows, tableId } = ctx.request.body
|
const { rows, tableId } = ctx.request.body
|
||||||
|
|
||||||
let schema = null
|
let schema = null
|
||||||
|
|
||||||
if (tableId) {
|
if (tableId) {
|
||||||
const table = await sdk.tables.getTable(tableId)
|
const table = await sdk.tables.getTable(tableId)
|
||||||
schema = table.schema
|
schema = table.schema
|
||||||
|
|
||||||
|
if (!isExternalTable(table)) {
|
||||||
|
schema._id = {
|
||||||
|
name: "_id",
|
||||||
|
type: FieldType.STRING,
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ctx.status = 422
|
ctx.status = 422
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue