Skip to content

Commit

Permalink
Fix missed table name on iterate lfs meta objects (go-gitea#24768) (g…
Browse files Browse the repository at this point in the history
…o-gitea#24774)

Backport go-gitea#24768 by @lunny

Fix go-gitea#24763

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit 1bad05d)
  • Loading branch information
GiteaBot authored and earl-warren committed May 23, 2023
1 parent 9cf864c commit b261f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/git/lfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func IterateLFSMetaObjectsForRepo(ctx context.Context, repoID int64, f func(cont

for {
beans := make([]*CountLFSMetaObject, 0, batchSize)
sess := engine.Select("`lfs_meta_object`.*, COUNT(`l1`.oid) AS `count`").
sess := engine.Table("lfs_meta_object").Select("`lfs_meta_object`.*, COUNT(`l1`.oid) AS `count`").
Join("INNER", "`lfs_meta_object` AS l1", "`lfs_meta_object`.oid = `l1`.oid").
Where("`lfs_meta_object`.repository_id = ?", repoID)
if !opts.OlderThan.IsZero() {
Expand Down

0 comments on commit b261f44

Please sign in to comment.