diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-12-24 20:14:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-24 12:14:42 +0000 |
commit | d7770539f6497e9181d6293700099ac742b03a81 (patch) | |
tree | d7ccf5e37bf40cbb4e36887319469181e80884ee /routers | |
parent | 7cc44491fae1e5f00616a5b8d8da2934a8a619f8 (diff) | |
download | gitea-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.go | 4 |
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 |