From 3661b14d9703bba1fabf1444a374a7be9fd8926a Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 20 Nov 2024 02:55:59 +0800 Subject: [PATCH] Remove unnecessary code (#32560) (#32567) Backport #32560 by @lunny PushMirrors only be used in the repository setting page. So it should not be loaded on every repository page. Co-authored-by: Lunny Xiao --- services/context/repo.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/services/context/repo.go b/services/context/repo.go index c8005cfc72..45bd588166 100644 --- a/services/context/repo.go +++ b/services/context/repo.go @@ -394,14 +394,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) { } } - pushMirrors, _, err := repo_model.GetPushMirrorsByRepoID(ctx, repo.ID, db.ListOptions{}) - if err != nil { - ctx.ServerError("GetPushMirrorsByRepoID", err) - return - } - ctx.Repo.Repository = repo - ctx.Data["PushMirrors"] = pushMirrors ctx.Data["RepoName"] = ctx.Repo.Repository.Name ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty }