mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
Merge db.Iterate and IterateObjects (#21641)
These two functions are similiar, merge them.
This commit is contained in:
@@ -269,13 +269,10 @@ func fixBrokenRepoUnits16961(ctx context.Context, logger log.Logger, autofix boo
|
||||
|
||||
err := db.Iterate(
|
||||
ctx,
|
||||
new(RepoUnit),
|
||||
builder.Gt{
|
||||
"id": 0,
|
||||
},
|
||||
func(idx int, bean interface{}) error {
|
||||
unit := bean.(*RepoUnit)
|
||||
|
||||
func(ctx context.Context, unit *RepoUnit) error {
|
||||
bs := unit.Config
|
||||
repoUnit := &repo_model.RepoUnit{
|
||||
ID: unit.ID,
|
||||
|
Reference in New Issue
Block a user