Added fallback to hostsFixed too which is used in COLLECTIVE (#6500)

pull/6454/head
Alex van Andel 2023-01-16 10:46:06 +00:00 committed by GitHub
parent af0b08bb2b
commit 716407ad90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -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