From 02827809f2616adb2bff5577b77f80b8616135a5 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 18 Apr 2023 16:27:59 +0200 Subject: [PATCH] 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. --- templates/repo/issue/view_content/sidebar.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index a2f12083c6394..290488d9fbb94 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -690,7 +690,7 @@ {{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}}