From db503fc445cf6ba4fcd38300716904f5f1e72203 Mon Sep 17 00:00:00 2001 From: Aashish Agrawal Date: Sat, 4 Nov 2023 16:56:53 +0530 Subject: [PATCH] Id conflict issue solved --- packages/nocodb/src/services/datas.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/services/datas.service.ts b/packages/nocodb/src/services/datas.service.ts index fbbc4ee5db..06495d9132 100644 --- a/packages/nocodb/src/services/datas.service.ts +++ b/packages/nocodb/src/services/datas.service.ts @@ -63,7 +63,7 @@ export class DatasService { async dataInsert( param: PathParams & { - body: unknown; + body: any; cookie: any; disableOptimization?: boolean; }, @@ -78,6 +78,10 @@ export class DatasService { dbDriver: await NcConnectionMgrv2.get(source), }); + if (param?.body?.Id) { + delete param?.body?.Id + } + return await baseModel.insert(param.body, null, param.cookie); } @@ -933,7 +937,7 @@ export class DatasService { .sort((c1, c2) => Array.isArray(fields) ? fields.indexOf(c1.title as any) - - fields.indexOf(c2.title as any) + fields.indexOf(c2.title as any) : 0, ) .filter(