Skip to content

Commit 3661b14

Browse files
GiteaBotlunny
andauthored
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 <xiaolunwen@gmail.com>
1 parent cf2d332 commit 3661b14

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

services/context/repo.go

-7
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) {
394394
}
395395
}
396396

397-
pushMirrors, _, err := repo_model.GetPushMirrorsByRepoID(ctx, repo.ID, db.ListOptions{})
398-
if err != nil {
399-
ctx.ServerError("GetPushMirrorsByRepoID", err)
400-
return
401-
}
402-
403397
ctx.Repo.Repository = repo
404-
ctx.Data["PushMirrors"] = pushMirrors
405398
ctx.Data["RepoName"] = ctx.Repo.Repository.Name
406399
ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty
407400
}

0 commit comments

Comments
 (0)