aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author65432020-01-17 16:25:46 +0100
committerLunny Xiao2020-01-17 23:25:46 +0800
commitc975287149cc8abfdeb0f0f3f11e33e6cd40f18b (patch)
tree08aaed63297905b863ecedbd0309325e132c7fd1
parentb31068652aaffd3a157ae87ea52b2f7cd89970da (diff)
fix (#9838)
-rw-r--r--routers/repo/compare.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/routers/repo/compare.go b/routers/repo/compare.go
index a307109ba..832f97676 100644
--- a/routers/repo/compare.go
+++ b/routers/repo/compare.go
@@ -373,7 +373,8 @@ func CompareDiff(ctx *context.Context) {
return
}
defer headGitRepo.Close()
- if err := parseBaseRepoInfo(ctx, headRepo); err != nil {
+ var err error
+ if err = parseBaseRepoInfo(ctx, headRepo); err != nil {
ctx.ServerError("parseBaseRepoInfo", err)
return
}
@@ -415,6 +416,11 @@ func CompareDiff(ctx *context.Context) {
beforeCommitID := ctx.Data["BeforeCommitID"].(string)
afterCommitID := ctx.Data["AfterCommitID"].(string)
+ if ctx.Data["Assignees"], err = ctx.Repo.Repository.GetAssignees(); err != nil {
+ ctx.ServerError("GetAssignees", err)
+ return
+ }
+
ctx.Data["Title"] = "Comparing " + base.ShortSha(beforeCommitID) + "..." + base.ShortSha(afterCommitID)
ctx.Data["IsRepoToolbarCommits"] = true