From f9f2c163b12f60a6bf9c3652cdc4bdf59e3d53c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=99=BA=E8=B6=85?= <1012112796@qq.com> Date: Sat, 28 Mar 2020 22:22:52 +0800 Subject: [PATCH] bug: fix assignees double load bug (#10856) Because the assigness has been loaded in compare.go 416: RetrieveRepoMetas(ctx, ctx.Repo.Repository, true) then issue.go 381 RetrieveRepoMilestonesAndAssignees(ctx, repo) then issue.go 361 -- 365 , they are load assignees So the code on compare.go 425 -- 427 is double work, and which is the reason of #10853 Signed-off-by: a1012112796 <1012112796@qq.com> --- routers/repo/compare.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/routers/repo/compare.go b/routers/repo/compare.go index d7fddc4558..4769a4da1a 100644 --- a/routers/repo/compare.go +++ b/routers/repo/compare.go @@ -422,10 +422,6 @@ 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)