mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 09:51:53 +00:00
Fix calendar migration (#8532)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
72f053a4f3
commit
2674b7bf4b
@ -1 +1 @@
|
||||
"0.6.483"
|
||||
"0.6.490"
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user