about summary refs log tree commit diff
path: root/app/services/block_domain_service.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-08-21 19:54:21 +0200
committerGitHub <noreply@github.com>2018-08-21 19:54:21 +0200
commit37965ac8d9773ae79f6b8dd6fcd353894d2194ca (patch)
tree51f194442d2ec7ab760b443b98c7685f64481ca7 /app/services/block_domain_service.rb
parentc78918162642649ce294d89effbf2e815c2aa327 (diff)
parent8b4abaa90d8dff64525d92c3ba1c750356608240 (diff)
Merge pull request #660 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/block_domain_service.rb')
-rw-r--r--app/services/block_domain_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/block_domain_service.rb b/app/services/block_domain_service.rb
index d082de40b..a1fe93665 100644
--- a/app/services/block_domain_service.rb
+++ b/app/services/block_domain_service.rb
@@ -43,14 +43,14 @@ class BlockDomainService < BaseService
   end
 
   def suspend_accounts!
-    blocked_domain_accounts.where(suspended: false).find_each do |account|
+    blocked_domain_accounts.where(suspended: false).reorder(nil).find_each do |account|
       UnsubscribeService.new.call(account) if account.subscribed?
       SuspendAccountService.new.call(account)
     end
   end
 
   def clear_account_images!
-    blocked_domain_accounts.find_each do |account|
+    blocked_domain_accounts.reorder(nil).find_each do |account|
       account.avatar.destroy if account.avatar.exists?
       account.header.destroy if account.header.exists?
       account.save
@@ -58,7 +58,7 @@ class BlockDomainService < BaseService
   end
 
   def clear_account_attachments!
-    media_from_blocked_domain.find_each do |attachment|
+    media_from_blocked_domain.reorder(nil).find_each do |attachment|
       @affected_status_ids << attachment.status_id if attachment.status_id.present?
 
       attachment.file.destroy if attachment.file.exists?