From 6fa5727166b83b37383c33bad52f9ccc5766a005 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 11 Oct 2023 13:19:05 +0200 Subject: [PATCH] Clean --- packages/server/src/utilities/rowProcessor/index.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index 0a7e774fc9..766e1e6ba5 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -77,7 +77,7 @@ export function processAutoColumn( continue } if (!schema.subtype) { - schema = fixAutoColumnSubType(schema as AutoColumnFieldMetadata) + schema = fixAutoColumnSubType(schema) } switch (schema.subtype) { case AutoFieldSubTypes.CREATED_BY: @@ -100,12 +100,8 @@ export function processAutoColumn( break case AutoFieldSubTypes.AUTO_ID: if (creating) { - const safeSchema = schema as AutoColumnFieldMetadata - - safeSchema.lastID = !safeSchema.lastID - ? BASE_AUTO_ID - : safeSchema.lastID + 1 - row[key] = safeSchema.lastID + schema.lastID = !schema.lastID ? BASE_AUTO_ID : schema.lastID + 1 + row[key] = schema.lastID } break }