diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-04-26 11:03:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 11:03:39 +0800 |
commit | 4c34bc111ce020161a2fbd962a19a9123b3e2dc4 (patch) | |
tree | fd7dae27b71494ae7707644b2368e89d155d3956 /routers | |
parent | ec2d489d15580ba934f34d8cdf3d779e1d64374d (diff) | |
download | gitea-4c34bc111ce020161a2fbd962a19a9123b3e2dc4.tar.gz gitea-4c34bc111ce020161a2fbd962a19a9123b3e2dc4.zip |
fix pulls broken when fork repository deleted (#6754)
* fix pulls broken when fork repository deleted
* fix lint
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 42661ef738..4b76bf5ad9 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -223,7 +223,12 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB return } - if isPullOption == util.OptionalBoolTrue { + if issues[i].IsPull { + if err := issues[i].LoadPullRequest(); err != nil { + ctx.ServerError("LoadPullRequest", err) + return + } + commitStatus[issues[i].PullRequest.ID], _ = issues[i].PullRequest.GetLastCommitStatus() } } |