Fix createdOn be set on middleware (#7224)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions

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)