Skip to content

Commit

Permalink
Fix missed table name on iterate lfs meta objects (#24768) (#24774)
Browse files Browse the repository at this point in the history
Backport #24768 by @lunny

Fix #24763

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
  • Loading branch information
GiteaBot and lunny authored May 17, 2023
1 parent 57f520e commit 1bad05d
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 1bad05d

Please sign in to comment.