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. 4
      packages/nocodb/src/services/datas.service.ts

4
packages/nocodb/src/services/datas.service.ts

@ -103,11 +103,15 @@ export class DatasService {
dbDriver: await NcConnectionMgrv2.get(base), dbDriver: await NcConnectionMgrv2.get(base),
}); });
// if xcdb project skip checking for LTAR
if (!base.is_meta) {
// todo: Should have error http status code // todo: Should have error http status code
const message = await baseModel.hasLTARData(param.rowId, model); const message = await baseModel.hasLTARData(param.rowId, model);
if (message.length) { if (message.length) {
return { message }; return { message };
} }
}
return await baseModel.delByPk(param.rowId, null, param.cookie); return await baseModel.delByPk(param.rowId, null, param.cookie);
} }

Loading…
Cancel
Save