Fix calendar migration (#8532)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2025-04-11 10:54:43 +05:00 committed by GitHub
parent 72f053a4f3
commit 2674b7bf4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
"0.6.483"
"0.6.490"

View File

@ -132,8 +132,8 @@ async function fillUser (client: MigrationClient): Promise<void> {
const calendar = map.get(event.calendar)
if (calendar !== undefined) {
await client.update(
DOMAIN_CALENDAR,
{ _id: calendar._id },
DOMAIN_EVENT,
{ _id: event._id },
{ user: event.createdBy !== core.account.System ? event.createdBy : calendar.createdBy }
)
}
@ -191,7 +191,7 @@ export const calendarOperation: MigrateOperation = {
func: removeEventDuplicates
},
{
state: 'fill-user',
state: 'fill-user-v2',
mode: 'upgrade',
func: fillUser
}