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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user