fix: Legacy Routing Forms handling - Allow team Event in existing non-team Routing forms (#9852)
parent
000f39b9c8
commit
be40e4b4b0
|
@ -105,11 +105,16 @@ const Route = ({
|
|||
userId: form.userId,
|
||||
},
|
||||
});
|
||||
if (!eventTypeValidInContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
group.eventTypes.forEach((eventType) => {
|
||||
const uniqueSlug = `${group.profile.slug}/${eventType.slug}`;
|
||||
const isRouteAlreadyInUse = isRouter(route) ? false : uniqueSlug === route.action.value;
|
||||
|
||||
// If Event is already in use, we let it be so as to not break the existing setup
|
||||
if (!isRouteAlreadyInUse && !eventTypeValidInContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
eventOptions.push({
|
||||
label: uniqueSlug,
|
||||
value: uniqueSlug,
|
||||
|
|
Loading…
Reference in New Issue