Skip to content

Commit 6cd4e24

Browse files
committed
addressing pr comments
1 parent f1ed2ce commit 6cd4e24

File tree

1 file changed

+6
-0
lines changed
  • packages/runtime/src/client/crud/operations

1 file changed

+6
-0
lines changed

packages/runtime/src/client/crud/operations/base.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,9 @@ export abstract class BaseOperationHandler<Schema extends SchemaDef> {
14881488
const results: (unknown | undefined)[] = [];
14891489
for (const d of _data) {
14901490
const ids = await this.getEntityIds(kysely, model, d);
1491+
if (!ids) {
1492+
throw new NotFoundError(model);
1493+
}
14911494
const r = await this.handleManyToManyRelation(
14921495
kysely,
14931496
'connect',
@@ -1732,6 +1735,9 @@ export abstract class BaseOperationHandler<Schema extends SchemaDef> {
17321735
const results: (unknown | undefined)[] = [];
17331736
for (const d of _data) {
17341737
const ids = await this.getEntityIds(kysely, model, d);
1738+
if (!ids) {
1739+
throw new NotFoundError(model);
1740+
}
17351741
results.push(
17361742
await this.handleManyToManyRelation(
17371743
kysely,

0 commit comments

Comments
 (0)