From 56f31eee7ab517c844b6ad5928dfebb7d438626e Mon Sep 17 00:00:00 2001 From: Amit Sharma <74371312+Amit91848@users.noreply.github.com> Date: Mon, 13 May 2024 19:59:56 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20Regression:=20Can=E2=80=99t=20set=20pers?= =?UTF-8?q?on=20to=20forward=20OOO=20bookings=20(#15003)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routers/loggedInViewer/outOfOffice.handler.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.ts b/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.ts index 2f1753feb9..adb80cf689 100644 --- a/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.ts +++ b/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.ts @@ -53,8 +53,14 @@ export const outOfOfficeCreate = async ({ ctx, input }: TBookingRedirect) => { /** You can only create OOO for members of teams you belong to */ teams: { some: { - userId: ctx.user.id, - accepted: true, + team: { + members: { + some: { + userId: ctx.user.id, + accepted: true, + }, + }, + }, }, }, },