From f3762885c68a02cd5fabe4e93adadaf6395b57bd Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 11 Oct 2023 13:29:35 +0200 Subject: [PATCH] Clean types --- packages/server/src/api/controllers/table/internal.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/controllers/table/internal.ts b/packages/server/src/api/controllers/table/internal.ts index 81e203d405..702dd1bb9d 100644 --- a/packages/server/src/api/controllers/table/internal.ts +++ b/packages/server/src/api/controllers/table/internal.ts @@ -36,9 +36,7 @@ function checkAutoColumns(table: Table, oldTable?: Table) { if (oldSchema && oldSchema.subtype) { table.schema[key].subtype = oldSchema.subtype } else { - table.schema[key] = fixAutoColumnSubType( - schema as AutoColumnFieldMetadata - ) + table.schema[key] = fixAutoColumnSubType(schema) } } return table @@ -84,7 +82,7 @@ export async function save(ctx: UserCtx) { for (const propKey of Object.keys(tableToSave.schema)) { let oldColumn = oldTable.schema[propKey] if (oldColumn && oldColumn.type === FieldTypes.INTERNAL) { - oldColumn.type = FieldTypes.AUTO as any // TODO + oldTable.schema[propKey].type = FieldTypes.AUTO } } }