fix: Allow booking details view for round robin with no hosts (#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
This commit is contained in:
Dhairyashil Shinde
2025-10-21 14:04:42 +00:00
committed by GitHub
parent e310931417
commit 5bc1fbb8c2
@@ -121,13 +121,22 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
: eventTypeRaw.users;
if (!eventTypeRaw.users.length) {
if (!eventTypeRaw.owner)
return {
notFound: true,
} as const;
eventTypeRaw.users.push({
...eventTypeRaw.owner,
});
if (!eventTypeRaw.owner) {
if (bookingInfoRaw.user) {
eventTypeRaw.users.push({
...bookingInfoRaw.user,
hideBranding: false,
theme: null,
brandColor: null,
darkBrandColor: null,
isPlatformManaged: false,
});
} else {
return { notFound: true } as const;
}
} else {
eventTypeRaw.users.push({ ...eventTypeRaw.owner });
}
}
const eventType = {