]> source.dussan.org Git - gitea.git/commitdiff
fix (#9838)
author6543 <6543@obermui.de>
Fri, 17 Jan 2020 15:25:46 +0000 (16:25 +0100)
committerLunny Xiao <xiaolunwen@gmail.com>
Fri, 17 Jan 2020 15:25:46 +0000 (23:25 +0800)
routers/repo/compare.go

index a307109ba085c5deef4815c7123765bfc183e134..832f976760c8bf2ae26318af3ccfc393205bbfc6 100644 (file)
@@ -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