1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-03-26 07:20:09 +00:00

Fix template error in pull request with deleted head repo ()

Rendering of Allow Edits from Maintainers did not check if the head repo
exists, while other parts of the page handle it gracefully.
This commit is contained in:
Brecht Van Lommel 2023-04-19 20:21:48 +02:00 committed by GitHub
parent b39a5bbbd6
commit eed6b28fc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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