Fix missed table name on iterate lfs meta objects

pull/24758/head^2
Lunny Xiao 2 years ago committed by GitHub
parent 6c8235dc98
commit 3364092013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      models/git/lfs.go

@ -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() {

Loading…
Cancel
Save