diff --git a/cmd/init.go b/cmd/init.go index d00f026a..4b0caf43 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -439,11 +439,12 @@ func initTxTemplates(m *manager.Manager, app *App) { } for _, t := range tpls { - if err := t.Compile(app.manager.GenericTemplateFuncs()); err != nil { - lo.Printf("error compiling transactional template %d: %v", t.ID, err) + tpl := t + if err := tpl.Compile(app.manager.GenericTemplateFuncs()); err != nil { + lo.Printf("error compiling transactional template %d: %v", tpl.ID, err) continue } - m.CacheTpl(t.ID, &t) + m.CacheTpl(tpl.ID, &tpl) } }