Browse Source

refactor: if child ids array empty return without throwing error

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5747/head
Pranav C 2 years ago
parent
commit
2806aef2e7
  1. 4
      packages/nocodb/src/db/BaseModelSqlv2.ts

4
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -3639,6 +3639,8 @@ class BaseModelSqlv2 {
NcError.notFound(`Row with id '${rowId}' not found`);
}
if (!childIds.length) return;
const colOptions = await column.getColOptions<LinkToAnotherRecordColumn>();
const childColumn = await colOptions.getChildColumn();
@ -3862,6 +3864,8 @@ class BaseModelSqlv2 {
NcError.notFound(`Row with id '${rowId}' not found`);
}
if (!childIds.length) return;
const colOptions = await column.getColOptions<LinkToAnotherRecordColumn>();
const childColumn = await colOptions.getChildColumn();

Loading…
Cancel
Save