Skip to content

Commit

Permalink
fix: minor CR fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
  • Loading branch information
FUSAKLA committed Jan 3, 2023
1 parent 307b367 commit 975295f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/alertmanager/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func withTenantIDFunc(userID string) template.Option {
funcs := tmpltext.FuncMap{"tenantID": func() string { return userID }}
return func(text *tmpltext.Template, html *tmplhtml.Template) {
text.Funcs(funcs)
html.Funcs(tmplhtml.FuncMap(funcs))
html.Funcs(funcs)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/alertmanager/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func validateUserConfig(logger log.Logger, cfg alertspb.AlertConfigDesc, limits
templateFiles[i] = filepath.Join(userTempDir, t)
}

_, err = template.FromGlobs(templateFiles)
_, err = template.FromGlobs(templateFiles, withTenantIDFunc(user))
if err != nil {
return err
}
Expand Down

0 comments on commit 975295f

Please sign in to comment.