From 4832508fa86a13622d94f9bb9c690c03fbe82a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20G=C3=A4hwiler?= Date: Fri, 8 Sep 2023 21:20:39 +0200 Subject: [PATCH] torch: remove tag only if run in transaction --- torch/reactor.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/torch/reactor.go b/torch/reactor.go index 00142d39..9081a2c8 100644 --- a/torch/reactor.go +++ b/torch/reactor.go @@ -121,8 +121,10 @@ func (r *Reactor) Check(ctx context.Context, model coal.Model) error { continue } - // remove tag - model.GetBase().SetTag(operation.TagName, nil, time.Time{}) + // remove tag only if run in transaction + if coal.HasTransaction(ctx) { + model.GetBase().SetTag(operation.TagName, nil, time.Time{}) + } } return nil