eqms-1582: fix roles migration (#9230)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev
2025-06-13 20:34:00 +04:00
committed by GitHub
parent 0a77ddfc4b
commit 754ad6e3a7
+3 -2
View File
@@ -542,9 +542,10 @@ async function migrateAccounts (client: MigrationClient): Promise<void> {
accountUuidBySocialKey
)
update[`${type.targetClass}`] = {
[role._id]: newAssignees
if (update[`${type.targetClass}`] == null) {
update[`${type.targetClass}`] = {}
}
update[`${type.targetClass}`][role._id] = newAssignees
}
}
}