Skip to content

Commit

Permalink
Added fallback to hostsFixed too which is used in COLLECTIVE (#6500)
Browse files Browse the repository at this point in the history
  • Loading branch information
emrysal committed Jan 16, 2023
1 parent af0b08b commit 716407a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/web/pages/event-types/[type]/index.tsx
Expand Up @@ -204,8 +204,14 @@ const EventTypePage = (props: EventTypeSetupProps) => {
metadata,
hosts: !!eventType.hosts?.length
? eventType.hosts.filter((host) => !host.isFixed)
: eventType.users.map((user) => ({ userId: user.id })),
hostsFixed: eventType.hosts.filter((host) => host.isFixed),
: eventType.users
.filter(() => eventType.schedulingType === SchedulingType.ROUND_ROBIN)
.map((user) => ({ userId: user.id })),
hostsFixed: !!eventType.hosts?.length
? eventType.hosts.filter((host) => host.isFixed)
: eventType.users
.filter(() => eventType.schedulingType === SchedulingType.COLLECTIVE)
.map((user) => ({ userId: user.id })),
},
resolver: zodResolver(
z
Expand Down

0 comments on commit 716407a

Please sign in to comment.