summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content/sidebar.tmpl
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2023-04-19 20:21:48 +0200
committerGitHub <noreply@github.com>2023-04-19 14:21:48 -0400
commiteed6b28fc0924ce394ee3913ed0973c44a525c20 (patch)
tree640deccda8e92319a0038048fae6d54096933d62 /templates/repo/issue/view_content/sidebar.tmpl
parentb39a5bbbd610ba30651218658caaec1c86d6bca1 (diff)
downloadgitea-eed6b28fc0924ce394ee3913ed0973c44a525c20.tar.gz
gitea-eed6b28fc0924ce394ee3913ed0973c44a525c20.zip
Fix template error in pull request with deleted head repo (#24192)
Rendering of Allow Edits from Maintainers did not check if the head repo exists, while other parts of the page handle it gracefully.
Diffstat (limited to 'templates/repo/issue/view_content/sidebar.tmpl')
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index a2f12083c6..290488d9fb 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -690,7 +690,7 @@
</div>
{{end}}
- {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed)}}
+ {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
<div class="ui divider"></div>
<div class="inline field">