summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-05-17 16:20:11 +0300
committerGitHub <noreply@github.com>2023-05-17 21:20:11 +0800
commitc839d6f92a63ee2adacf4f706403e93bbe69b2da (patch)
tree26112fb4160c072f6eefb1be7a5a8b8436949929 /models
parent29096d8ef5521442f760891d4b6c6196a70ea3ed (diff)
downloadgitea-c839d6f92a63ee2adacf4f706403e93bbe69b2da.tar.gz
gitea-c839d6f92a63ee2adacf4f706403e93bbe69b2da.zip
Revert "Fix missed table name on iterate lfs meta objects" (#24764)
This reverts commit 3364092013aa4d5d27ad02806b0f47967c04de18. It was accidentally pushed to `main` without a review.
Diffstat (limited to 'models')
-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 0f90b29200..0ba8e919d0 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.Table("lfs_meta_object").Select("`lfs_meta_object`.*, COUNT(`l1`.oid) AS `count`").
+ sess := engine.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() {