Use hash arguments to group when possible (#32916)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user