aboutsummaryrefslogtreecommitdiffstats
path: root/modules/doctor/fix16961.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-10-31 23:51:14 +0800
committerGitHub <noreply@github.com>2022-10-31 23:51:14 +0800
commit9a70a12a341b8e7773efc661693e4b7e3199a4bd (patch)
tree2e4f3e18315ef52e68d4bfea5939d5517d3ca56b /modules/doctor/fix16961.go
parent4ae3f762177a2cdb449b949501420e88462f8f95 (diff)
downloadgitea-9a70a12a341b8e7773efc661693e4b7e3199a4bd.tar.gz
gitea-9a70a12a341b8e7773efc661693e4b7e3199a4bd.zip
Merge db.Iterate and IterateObjects (#21641)
These two functions are similiar, merge them.
Diffstat (limited to 'modules/doctor/fix16961.go')
-rw-r--r--modules/doctor/fix16961.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/doctor/fix16961.go b/modules/doctor/fix16961.go
index 307cfcd9ff..d9f895739f 100644
--- a/modules/doctor/fix16961.go
+++ b/modules/doctor/fix16961.go
@@ -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,