Fix calendar service (#8981)

This commit is contained in:
Denis Bykhov
2025-05-19 02:41:31 +07:00
committed by GitHub
parent 6691ac27a2
commit 3fcc9035bb
3 changed files with 14 additions and 6 deletions
+9 -1
View File
@@ -1,5 +1,11 @@
import calendar from '@hcengineering/calendar'
import { type PersonId, type WorkspaceInfoWithStatus, type WorkspaceUuid, systemAccountUuid } from '@hcengineering/core'
import {
type PersonId,
type WorkspaceInfoWithStatus,
type WorkspaceUuid,
isActiveMode,
systemAccountUuid
} from '@hcengineering/core'
import { getClient as getKvsClient } from '@hcengineering/kvs-client'
import { createClient, getAccountClient } from '@hcengineering/server-client'
import { generateToken } from '@hcengineering/server-token'
@@ -129,6 +135,7 @@ async function migrateCalendarIntegrations (
if (ws == null) {
continue
}
if (!isActiveMode(ws.mode)) continue
token.workspace = ws.uuid
const personId = await getPersonIdByEmail(ws.uuid, token.email, token.userId)
@@ -215,6 +222,7 @@ async function migrateCalendarHistory (
if (ws == null) {
continue
}
if (!isActiveMode(ws.mode)) continue
const personId = await getPersonIdByEmail(ws.uuid, history.email, history.userId)
if (personId == null) {