diff --git a/packages/core/EventManager.ts b/packages/core/EventManager.ts index 97f95b201b..d981c1fdac 100644 --- a/packages/core/EventManager.ts +++ b/packages/core/EventManager.ts @@ -1,7 +1,7 @@ -import { DestinationCalendar } from "@prisma/client"; +import type { DestinationCalendar } from "@prisma/client"; import merge from "lodash/merge"; import { v5 as uuidv5 } from "uuid"; -import { z } from "zod"; +import type { z } from "zod"; import { FAKE_DAILY_CREDENTIAL } from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter"; import { getEventLocationTypeFromApp } from "@calcom/app-store/locations"; @@ -10,7 +10,7 @@ import getApps from "@calcom/app-store/utils"; import prisma from "@calcom/prisma"; import { createdEventSchema } from "@calcom/prisma/zod-utils"; import type { AdditionalInformation, CalendarEvent, NewCalendarEventType } from "@calcom/types/Calendar"; -import { CredentialPayload, CredentialWithAppName } from "@calcom/types/Credential"; +import type { CredentialPayload, CredentialWithAppName } from "@calcom/types/Credential"; import type { Event } from "@calcom/types/Event"; import type { CreateUpdateResult, @@ -255,8 +255,10 @@ export default class EventManager { results.push(result); } - // Update all calendar events. - results.push(...(await this.updateAllCalendarEvents(evt, booking))); + // If there is a calendar reference, update all calendar events. + if (booking.references.some((reference) => reference.type.includes("_calendar"))) { + results.push(...(await this.updateAllCalendarEvents(evt, booking))); + } const bookingPayment = booking?.payment;