mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-26 23:41:52 +00:00
Fix follow requests N+1 (#12004)
This commit is contained in:
parent
3babf8464b
commit
9ef5532a7e
|
@ -21,7 +21,7 @@ class UpdateAccountService < BaseService
|
|||
|
||||
def authorize_all_follow_requests(account)
|
||||
follow_requests = FollowRequest.where(target_account: account)
|
||||
follow_requests = follow_requests.select { |req| !req.account.silenced? }
|
||||
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? }
|
||||
AuthorizeFollowWorker.push_bulk(follow_requests) do |req|
|
||||
[req.account_id, req.target_account_id]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user