fix: clear videoCallData and iCalUID when organizer changes in round-robin reassignment (#24474)
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
This commit is contained in:
co-authored by
Anik Dhabal Babu
parent
78c2a69389
commit
9afdb1ad7e
@@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
|
||||
import { cloneDeep } from "lodash";
|
||||
|
||||
import { enrichUserWithDelegationCredentialsIncludeServiceAccountKey } from "@calcom/app-store/delegationCredential";
|
||||
@@ -312,6 +312,13 @@ export const roundRobinManualReassignment = async ({
|
||||
conferenceCredentialId: conferenceCredentialId ?? undefined,
|
||||
};
|
||||
|
||||
if( hasOrganizerChanged ){
|
||||
// location might changed and will be new created in eventManager.create (organizer default location)
|
||||
evt.videoCallData = undefined;
|
||||
// To prevent "The requested identifier already exists" error while updating event, we need to remove iCalUID
|
||||
evt.iCalUID = undefined;
|
||||
}
|
||||
|
||||
const credentials = await prisma.credential.findMany({
|
||||
where: { userId: newUser.id },
|
||||
include: { user: { select: { email: true } } },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
|
||||
import { cloneDeep } from "lodash";
|
||||
|
||||
import {
|
||||
@@ -341,6 +341,12 @@ export const roundRobinReassignment = async ({
|
||||
...(platformClientParams ? platformClientParams : {}),
|
||||
};
|
||||
|
||||
if(hasOrganizerChanged){
|
||||
// location might changed and will be new created in eventManager.create (organizer default location)
|
||||
evt.videoCallData = undefined;
|
||||
// To prevent "The requested identifier already exists" error while updating event, we need to remove iCalUID
|
||||
evt.iCalUID = undefined;
|
||||
}
|
||||
const credentials = await prisma.credential.findMany({
|
||||
where: {
|
||||
userId: organizer.id,
|
||||
|
||||
Reference in New Issue
Block a user