Skip to content

Scheduling infrastructure for absolutely everyone.

fix: Regression: Can’t set person to forward OOO bookings (#15003)

Amit Sharma56f31eee7ab5
diff --git a/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.ts b/packages/trpc/server/routers/loggedInViewer/outOfOffice.handler.ts
index 2f1753feb9b..adb80cf6899 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,
+ },
+ },
+ },
},
},
},