Skip to content

Commit 5157f44

Browse files
Add includes to update result payload
1 parent d61b227 commit 5157f44

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/server/src/api/rest/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,10 @@ class RequestHandler extends APIHandlerBase {
970970
}
971971
}
972972

973+
// include IDs of relation fields so that they can be serialized.
974+
// This ensures valid relationships are included in the result payload.
975+
this.includeRelationshipIds(type, updatePayload, 'include');
976+
973977
const entity = await prisma[type].update(updatePayload);
974978
return {
975979
status: 200,

0 commit comments

Comments
 (0)