Fix createdOn be set on middleware (#7224)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-11-22 20:25:01 +07:00 committed by GitHub
parent fe68f8f4c6
commit 9f261a19d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,7 @@ export class ModifiedMiddleware extends BaseMiddleware implements Middleware {
for (const tx of txes) {
if (tx.modifiedBy !== core.account.System && ctx.contextData.userEmail !== systemAccountEmail) {
tx.modifiedOn = Date.now()
tx.createdOn = tx.createdOn ?? tx.modifiedOn
tx.createdOn = tx.modifiedOn
}
}
return this.provideTx(ctx, txes)