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,
|
userId: form.userId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (!eventTypeValidInContext) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
group.eventTypes.forEach((eventType) => {
|
group.eventTypes.forEach((eventType) => {
|
||||||
const uniqueSlug = `${group.profile.slug}/${eventType.slug}`;
|
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({
|
eventOptions.push({
|
||||||
label: uniqueSlug,
|
label: uniqueSlug,
|
||||||
value: uniqueSlug,
|
value: uniqueSlug,
|
||||||
|
|
Loading…
Reference in New Issue