1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 16:44:26 +00:00

Remove unnecessary code (#32560)

PushMirrors only be used in the repository setting page. So it should
not be loaded on every repository page.
This commit is contained in:
Lunny Xiao 2024-11-19 08:21:13 -08:00 committed by GitHub
parent 32456b6f31
commit 0d5abd9b3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -393,14 +393,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