aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-04-19 17:20:19 -0400
committerGitHub <noreply@github.com>2023-04-19 17:20:19 -0400
commit8cd5483e8add7f6579b2a377cc0d8027a4a05bfa (patch)
tree85f885a3c4e178599cdcb66c3b72433523801101
parent2e6e5bc9c96ebb760f28c08423bb0c244ca7e01c (diff)
downloadgitea-8cd5483e8add7f6579b2a377cc0d8027a4a05bfa.tar.gz
gitea-8cd5483e8add7f6579b2a377cc0d8027a4a05bfa.zip
Fix template error in pull request with deleted head repo (#24192) (#24216)
Backport #24192 by @brechtvl Rendering of Allow Edits from Maintainers did not check if the head repo exists, while other parts of the page handle it gracefully. Co-authored-by: Brecht Van Lommel <brecht@blender.org>
-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 0728f5390a..0d796af0f3 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -704,7 +704,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">