From c36dd229f9dcb1d77c46d8db23297fc5781b4a97 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Wed, 21 Oct 2020 22:59:21 -0500 Subject: Pluck status IDs instead of using select() --- app/services/after_block_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/services') diff --git a/app/services/after_block_service.rb b/app/services/after_block_service.rb index b39c8b591..3ee7e2e56 100644 --- a/app/services/after_block_service.rb +++ b/app/services/after_block_service.rb @@ -45,8 +45,8 @@ class AfterBlockService < BaseService def defederate_favourites! favourites = @account.favourites.joins(:status).where(statuses: { account_id: @target_account.id }) - favourites.select(:status_id).find_each do |favourite| - UnfavouriteWorker.perform_async(@account.id, favourite.status_id) + favourites.pluck(:status_id).each do |status_id| + UnfavouriteWorker.perform_async(@account.id, status_id) end end end -- cgit