mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
UBERF-4405: empty Vacancies' members (#4105)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
ca8bc92cbb
commit
89baa98767
@ -77,6 +77,16 @@ export const recruitOperation: MigrateOperation = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
state: 'remove-members',
|
||||
func: async (client): Promise<void> => {
|
||||
const ops = new TxOperations(client, core.account.System)
|
||||
const docs = await ops.findAll(recruit.class.Vacancy, { members: { $exists: true, $ne: [] } })
|
||||
for (const d of docs) {
|
||||
await ops.update(d, { members: [] })
|
||||
}
|
||||
}
|
||||
}
|
||||
])
|
||||
}
|
||||
|
@ -16,15 +16,7 @@
|
||||
import { AttachmentStyledBox } from '@hcengineering/attachment-resources'
|
||||
import contact, { Organization } from '@hcengineering/contact'
|
||||
import { UserBox } from '@hcengineering/contact-resources'
|
||||
import core, {
|
||||
Data,
|
||||
fillDefaults,
|
||||
FindResult,
|
||||
generateId,
|
||||
getCurrentAccount,
|
||||
Ref,
|
||||
SortingOrder
|
||||
} from '@hcengineering/core'
|
||||
import core, { Data, fillDefaults, FindResult, generateId, Ref, SortingOrder } from '@hcengineering/core'
|
||||
import { Card, createQuery, getClient, InlineAttributeBar, MessageBox } from '@hcengineering/presentation'
|
||||
import { Vacancy as VacancyClass } from '@hcengineering/recruit'
|
||||
import tags from '@hcengineering/tags'
|
||||
@ -176,7 +168,7 @@
|
||||
archived: false,
|
||||
number: (incResult as any).object.sequence,
|
||||
company,
|
||||
members: [getCurrentAccount()._id],
|
||||
members: [],
|
||||
type: typeId
|
||||
},
|
||||
objectId
|
||||
|
Loading…
Reference in New Issue
Block a user