mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-01 15:55:15 +08:00
Second part of refactor db.Find
(#28194)
Continue of #27798 and move more functions to `db.Find` and `db.Count`.
This commit is contained in:
@ -668,11 +668,9 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
|
||||
branchOpts := git_model.FindBranchOptions{
|
||||
RepoID: ctx.Repo.Repository.ID,
|
||||
IsDeletedBranch: util.OptionalBoolFalse,
|
||||
ListOptions: db.ListOptions{
|
||||
ListAll: true,
|
||||
},
|
||||
ListOptions: db.ListOptionsAll,
|
||||
}
|
||||
branchesTotal, err := git_model.CountBranches(ctx, branchOpts)
|
||||
branchesTotal, err := db.Count[git_model.Branch](ctx, branchOpts)
|
||||
if err != nil {
|
||||
ctx.ServerError("CountBranches", err)
|
||||
return cancel
|
||||
|
Reference in New Issue
Block a user