mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-12 10:25:51 +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)
|
const calendar = map.get(event.calendar)
|
||||||
if (calendar !== undefined) {
|
if (calendar !== undefined) {
|
||||||
await client.update(
|
await client.update(
|
||||||
DOMAIN_CALENDAR,
|
DOMAIN_EVENT,
|
||||||
{ _id: calendar._id },
|
{ _id: event._id },
|
||||||
{ user: event.createdBy !== core.account.System ? event.createdBy : calendar.createdBy }
|
{ user: event.createdBy !== core.account.System ? event.createdBy : calendar.createdBy }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ export const calendarOperation: MigrateOperation = {
|
|||||||
func: removeEventDuplicates
|
func: removeEventDuplicates
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
state: 'fill-user',
|
state: 'fill-user-v2',
|
||||||
mode: 'upgrade',
|
mode: 'upgrade',
|
||||||
func: fillUser
|
func: fillUser
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user