UBERF-5565 (#4669)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-02-16 17:40:17 +06:00 committed by GitHub
parent e3e7856b02
commit 0b06f0bbe7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 21 deletions

View File

@ -398,7 +398,12 @@ async function buildModel (
const userTx: Tx[] = []
const atxes = modelResponse.transactions
atxes.forEach((tx) => (tx.modifiedBy === core.account.System && !isPersonAccount(tx) ? systemTx : userTx).push(tx))
atxes.forEach((tx) =>
((tx.modifiedBy === core.account.ConfigUser || tx.modifiedBy === core.account.System) && !isPersonAccount(tx)
? systemTx
: userTx
).push(tx)
)
if (allowedPlugins != null) {
fillConfiguration(systemTx, configs)

View File

@ -228,25 +228,6 @@ export async function createProjectType (
const baseClassClass = client.getHierarchy().getClass(categoryObj.baseClass)
const targetProjectClassId: Ref<Class<Doc>> = generateId()
await client.createDoc(
core.class.Mixin,
core.space.Model,
{
extends: categoryObj.baseClass,
kind: ClassifierKind.MIXIN,
label: getEmbeddedLabel(data.name),
icon: baseClassClass.icon
},
targetProjectClassId,
undefined,
core.account.ConfigUser
)
await client.createMixin(targetProjectClassId, core.class.Mixin, core.space.Model, task.mixin.ProjectTypeClass, {
projectType: _id
})
const tmpl = await client.createDoc(
task.class.ProjectType,
core.space.Model,
@ -266,6 +247,22 @@ export async function createProjectType (
_id
)
await client.createDoc(
core.class.Mixin,
core.space.Model,
{
extends: categoryObj.baseClass,
kind: ClassifierKind.MIXIN,
label: getEmbeddedLabel(data.name),
icon: baseClassClass.icon
},
targetProjectClassId
)
await client.createMixin(targetProjectClassId, core.class.Mixin, core.space.Model, task.mixin.ProjectTypeClass, {
projectType: _id
})
return tmpl
}

View File

@ -143,7 +143,7 @@ export async function initModel (
try {
for (const op of migrateOperations) {
logger.log('Migrage', op[0])
logger.log('Migrate', op[0])
await op[1].upgrade(connection, logger)
}