diff --git a/models/core/src/migration.ts b/models/core/src/migration.ts index 1b7eccc7d1..dda334462c 100644 --- a/models/core/src/migration.ts +++ b/models/core/src/migration.ts @@ -542,9 +542,10 @@ async function migrateAccounts (client: MigrationClient): Promise { accountUuidBySocialKey ) - update[`${type.targetClass}`] = { - [role._id]: newAssignees + if (update[`${type.targetClass}`] == null) { + update[`${type.targetClass}`] = {} } + update[`${type.targetClass}`][role._id] = newAssignees } } }