From a36e734dfc97cf87190ef73d5a2e1d7a7597c9f3 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Fri, 22 Sep 2023 15:26:44 +0700 Subject: [PATCH] QFix: migration (#3734) Signed-off-by: Andrey Sobolev --- server/core/src/storage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/core/src/storage.ts b/server/core/src/storage.ts index 77c670e082..aea8348088 100644 --- a/server/core/src/storage.ts +++ b/server/core/src/storage.ts @@ -249,7 +249,7 @@ class TServerStorage implements ServerStorage { const oldAttachedTo = (await findAll(ctx, _class, { _id }, { limit: 1 }))[0] let oldTx: Tx | null = null if (oldAttachedTo !== undefined) { - const attr = this.hierarchy.getAttribute(oldAttachedTo._class, colTx.collection) + const attr = this.hierarchy.findAttribute(oldAttachedTo._class, colTx.collection) if (attr !== undefined) { oldTx = await this.getCollectionUpdateTx(_id, _class, tx.modifiedBy, colTx.modifiedOn, oldAttachedTo, { @@ -262,7 +262,7 @@ class TServerStorage implements ServerStorage { const newAttachedToCollection = operations.collection ?? colTx.collection const newAttachedTo = (await findAll(ctx, newAttachedToClass, { _id: operations.attachedTo }, { limit: 1 }))[0] let newTx: Tx | null = null - const newAttr = this.hierarchy.getAttribute(newAttachedToClass, newAttachedToCollection) + const newAttr = this.hierarchy.findAttribute(newAttachedToClass, newAttachedToCollection) if (newAttachedTo !== undefined && newAttr !== undefined) { newTx = await this.getCollectionUpdateTx( newAttachedTo._id,