From 916a8203cbad04ffe307a2fa4cceae3efdcbcb8b Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Wed, 4 May 2022 16:23:53 +0600 Subject: [PATCH] 1623 fix (#1634) --- server-plugins/notification-resources/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-plugins/notification-resources/src/index.ts b/server-plugins/notification-resources/src/index.ts index 451a3a23e9..dc134c4f34 100644 --- a/server-plugins/notification-resources/src/index.ts +++ b/server-plugins/notification-resources/src/index.ts @@ -48,7 +48,7 @@ const extractTx = (tx: Tx): Tx => { create.attributes.collection = ctx.collection return create } - return ctx + return ctx.tx } return tx @@ -136,7 +136,7 @@ export async function UpdateLastView (tx: Tx, control: TriggerControl): Promise< case core.class.TxMixin: { const tx = actualTx as TxCUD const doc = (await control.findAll(tx.objectClass, { _id: tx.objectId }, { limit: 1 }))[0] - if (doc !== undefined && !control.hierarchy.isDerived(doc._class, core.class.AttachedDoc)) { + if (doc !== undefined) { const resTx = await getUpdateLastViewTx(control.findAll, doc._id, doc._class, tx.modifiedOn, tx.modifiedBy) if (resTx !== undefined) { result.push(resTx)