diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-10-31 23:51:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 23:51:14 +0800 |
commit | 9a70a12a341b8e7773efc661693e4b7e3199a4bd (patch) | |
tree | 2e4f3e18315ef52e68d4bfea5939d5517d3ca56b /services/repository/avatar.go | |
parent | 4ae3f762177a2cdb449b949501420e88462f8f95 (diff) | |
download | gitea-9a70a12a341b8e7773efc661693e4b7e3199a4bd.tar.gz gitea-9a70a12a341b8e7773efc661693e4b7e3199a4bd.zip |
Merge db.Iterate and IterateObjects (#21641)
These two functions are similiar, merge them.
Diffstat (limited to 'services/repository/avatar.go')
-rw-r--r-- | services/repository/avatar.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/avatar.go b/services/repository/avatar.go index b80a8fb775..1cf9e869c0 100644 --- a/services/repository/avatar.go +++ b/services/repository/avatar.go @@ -96,7 +96,7 @@ func DeleteAvatar(repo *repo_model.Repository) error { // RemoveRandomAvatars removes the randomly generated avatars that were created for repositories func RemoveRandomAvatars(ctx context.Context) error { - return db.IterateObjects(ctx, func(repository *repo_model.Repository) error { + return db.Iterate(ctx, nil, func(ctx context.Context, repository *repo_model.Repository) error { select { case <-ctx.Done(): return db.ErrCancelledf("before random avatars removed for %s", repository.FullName()) |