2
0

Use hash arguments to group when possible (#32916)

This commit is contained in:
Matt Jankowski
2024-11-19 05:36:02 -05:00
committed by GitHub
parent 2b5faa2ba3
commit 37f00fb018
5 changed files with 6 additions and 6 deletions

View File

@@ -17,6 +17,6 @@ class AnnualReport::MostRebloggedAccounts < AnnualReport::Source
private
def most_reblogged_accounts
report_statuses.where.not(reblog_of_id: nil).joins(reblog: :account).group('accounts.id').having('count(*) > 1').order(count_all: :desc).limit(SET_SIZE).count
report_statuses.where.not(reblog_of_id: nil).joins(reblog: :account).group(accounts: [:id]).having('count(*) > 1').order(count_all: :desc).limit(SET_SIZE).count
end
end