Browse Source

refactor: allow deleting rows with LTAR relation for matadb base

Signed-off-by: Pranav C <pranavxc@gmail.com>
test/reset-fail
Pranav C 1 year ago
parent
commit
671d87db5e
  1. 12
      packages/nocodb/src/services/datas.service.ts

12
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);
}

Loading…
Cancel
Save