aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-05-17 18:26:43 +0800
committerGitHub <noreply@github.com>2023-05-17 18:26:43 +0800
commit3364092013aa4d5d27ad02806b0f47967c04de18 (patch)
tree07fd0285d98b72c11ba62503f47505f9084bf5c2
parent6c8235dc98322da3a6afdf61f105d4caaf8c152e (diff)
downloadgitea-3364092013aa4d5d27ad02806b0f47967c04de18.tar.gz
gitea-3364092013aa4d5d27ad02806b0f47967c04de18.zip
Fix missed table name on iterate lfs meta objects
-rw-r--r--models/git/lfs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/git/lfs.go b/models/git/lfs.go
index 0ba8e919d0..0f90b29200 100644
--- a/models/git/lfs.go
+++ b/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() {