Skip to content

Commit

Permalink
torch: remove tag only if run in transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
256dpi committed Sep 8, 2023
1 parent 8f62370 commit 4832508
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions torch/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4832508

Please # to comment.