mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
Fix modifiedOn collection inner tx (#1504)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
34ddd0cb6c
commit
a45fecaf69
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import core, { Doc, ServerStorage, Timestamp, Tx, TxCreateDoc } from '@anticrm/core'
|
||||
import core, { AttachedDoc, Doc, ServerStorage, Timestamp, Tx, TxCollectionCUD, TxCreateDoc } from '@anticrm/core'
|
||||
import { Middleware, SessionContext, TxMiddlewareResult } from '@anticrm/server-core'
|
||||
import { BaseMiddleware } from './base'
|
||||
|
||||
@ -37,6 +37,10 @@ export class ModifiedMiddleware extends BaseMiddleware implements Middleware {
|
||||
createTx.attributes.createOn = tx.modifiedOn
|
||||
}
|
||||
}
|
||||
if (this.storage.hierarchy.isDerived(tx._class, core.class.TxCollectionCUD)) {
|
||||
const coltx = tx as TxCollectionCUD<Doc, AttachedDoc>
|
||||
coltx.tx.modifiedOn = tx.modifiedOn
|
||||
}
|
||||
const res = await this.provideTx(ctx, tx)
|
||||
return [res[0], res[1], res[2]]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user