fix: clear videoCallData and iCalUID when organizer changes in round-robin reassignment (#24474)
Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
1 parent
78c2a69389
commit
9afdb1ad7e
2 files changed
+15
-2
No files matched your search
@@ -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