From 671d87db5e2cfd6b4c630f064b2fbbac8a698ca1 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 5 Jun 2023 12:45:42 +0530 Subject: [PATCH] refactor: allow deleting rows with LTAR relation for matadb base Signed-off-by: Pranav C --- packages/nocodb/src/services/datas.service.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/src/services/datas.service.ts b/packages/nocodb/src/services/datas.service.ts index c41609f6c0..cf82a9d585 100644 --- a/packages/nocodb/src/services/datas.service.ts +++ b/packages/nocodb/src/services/datas.service.ts @@ -103,11 +103,15 @@ export class DatasService { dbDriver: await NcConnectionMgrv2.get(base), }); - // todo: Should have error http status code - const message = await baseModel.hasLTARData(param.rowId, model); - if (message.length) { - return { message }; + // if xcdb project skip checking for LTAR + if (!base.is_meta) { + // todo: Should have error http status code + const message = await baseModel.hasLTARData(param.rowId, model); + if (message.length) { + return { message }; + } } + return await baseModel.delByPk(param.rowId, null, param.cookie); }