Skip to content

Commit d7a6e5c

Browse files
israelins85ymc9
andauthored
When using upsert the @default(auth().field) is not been handled (#1403)
Co-authored-by: Yiming <[email protected]>
1 parent 4e61a8b commit d7a6e5c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime/src/enhancements/default-auth.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ class DefaultAuthHandler extends DefaultPrismaProxyHandler {
8080
processCreatePayload(model, data);
8181
},
8282

83+
upsert: (model, data) => {
84+
processCreatePayload(model, data.create);
85+
},
86+
8387
createMany: (model, args) => {
8488
for (const item of enumerate(args.data)) {
8589
processCreatePayload(model, item);

0 commit comments

Comments
 (0)