Skip to content

Commit 34c76ee

Browse files
fix: use booking's organizationId for feature flag check in addGuests handler
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
1 parent a2c38fe commit 34c76ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/trpc/server/routers/viewer/bookings/addGuests.handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const addGuestsHandler = async ({
9090

9191
const bookingEventHandlerService = getBookingEventHandlerService();
9292
const featuresRepository = getFeaturesRepository();
93-
const organizationId = user.organizationId ?? null;
93+
const organizationId = booking.user?.profiles?.[0]?.organizationId ?? null;
9494
const isBookingAuditEnabled = organizationId
9595
? await featuresRepository.checkIfTeamHasFeature(organizationId, "booking-audit")
9696
: false;

0 commit comments

Comments
 (0)