diff options
author | Prasad Katti <prasadmkatti@gmail.com> | 2021-09-06 19:06:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 10:06:59 +0800 |
commit | 30708d9ffed497128d879821ff1a0357bcb06e18 (patch) | |
tree | 58350a4fd75af81ce06681dd39cca7fdc3cfd505 /templates | |
parent | 1b08dfeacfa2fbe8e301bd4660642099081d4015 (diff) | |
download | gitea-30708d9ffed497128d879821ff1a0357bcb06e18.tar.gz gitea-30708d9ffed497128d879821ff1a0357bcb06e18.zip |
Fix issue with issue default mail template (#16956) (#16975)
Backport #16956
The mail template rendering was failing with the error -
`...vices/mailer/mail.go:301:composeIssueCommentMessages() [E] ExecuteTemplate [issue/default/body]: template: issue/default:65:10: executing "issue/default" at <.i18n.Tr>: can't evaluate field i18n in type *models.Comment`
The issue was the template variable i18n is available in the outer scope.
Fix #16877
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/mail/issue/default.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index 071acdcbcf..40d69839b0 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -62,7 +62,7 @@ {{end -}} {{- range .ReviewComments}} <hr> - {{.i18n.Tr "mail.issue.in_tree_path" .TreePath}} + {{$.i18n.Tr "mail.issue.in_tree_path" .TreePath}} <div class="review"> <pre>{{.Patch}}</pre> <div>{{.RenderedContent | Safe}}</div> |