0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-26 17:34:11 -05:00

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>
This commit is contained in:
Giteabot 2023-04-19 17:20:19 -04:00 committed by GitHub
parent 2e6e5bc9c9
commit 8cd5483e8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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">