summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-12-24 20:14:42 +0800
committerGitHub <noreply@github.com>2021-12-24 12:14:42 +0000
commitd7770539f6497e9181d6293700099ac742b03a81 (patch)
treed7ccf5e37bf40cbb4e36887319469181e80884ee /routers
parent7cc44491fae1e5f00616a5b8d8da2934a8a619f8 (diff)
downloadgitea-d7770539f6497e9181d6293700099ac742b03a81.tar.gz
gitea-d7770539f6497e9181d6293700099ac742b03a81.zip
Improve interface when comparing a branch which has created a pull request (#17911)
* Improve interface when comparing a branch which has created a pull request * Take the note back
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/compare.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go
index c540cbc08a..3b016b15fb 100644
--- a/routers/web/repo/compare.go
+++ b/routers/web/repo/compare.go
@@ -735,6 +735,10 @@ func CompareDiff(ctx *context.Context) {
}
} else {
ctx.Data["HasPullRequest"] = true
+ if err := pr.LoadIssue(); err != nil {
+ ctx.ServerError("LoadIssue", err)
+ return
+ }
ctx.Data["PullRequest"] = pr
ctx.HTML(http.StatusOK, tplCompareDiff)
return