Skip to content

Commit 8f1e283

Browse files
brechtvlGiteaBot
authored andcommitted
Fix template error in pull request with deleted head repo (go-gitea#24192)
Rendering of Allow Edits from Maintainers did not check if the head repo exists, while other parts of the page handle it gracefully.
1 parent f134229 commit 8f1e283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/issue/view_content/sidebar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@
704704
</div>
705705
{{end}}
706706

707-
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed)}}
707+
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
708708
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
709709
<div class="ui divider"></div>
710710
<div class="inline field">

0 commit comments

Comments
 (0)