Skip to content

Commit 5bc1fbb

Browse files
authored
fix: Allow booking details view for round robin with no hosts (calcom#24250)
* Fix: Allow booking details view for round robin with no hosts * Fix: Allow booking details view for round robin with no hosts * fix: include the missing fields with defaults * fix: include the missing fields with defaults
1 parent e310931 commit 5bc1fbb

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

apps/web/modules/bookings/views/bookings-single-view.getServerSideProps.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,22 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
121121
: eventTypeRaw.users;
122122

123123
if (!eventTypeRaw.users.length) {
124-
if (!eventTypeRaw.owner)
125-
return {
126-
notFound: true,
127-
} as const;
128-
eventTypeRaw.users.push({
129-
...eventTypeRaw.owner,
130-
});
124+
if (!eventTypeRaw.owner) {
125+
if (bookingInfoRaw.user) {
126+
eventTypeRaw.users.push({
127+
...bookingInfoRaw.user,
128+
hideBranding: false,
129+
theme: null,
130+
brandColor: null,
131+
darkBrandColor: null,
132+
isPlatformManaged: false,
133+
});
134+
} else {
135+
return { notFound: true } as const;
136+
}
137+
} else {
138+
eventTypeRaw.users.push({ ...eventTypeRaw.owner });
139+
}
131140
}
132141

133142
const eventType = {

0 commit comments

Comments
 (0)