about summary refs log tree commit diff
path: root/app/models/form
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/models/form
parentc78918162642649ce294d89effbf2e815c2aa327 (diff)
parent8b4abaa90d8dff64525d92c3ba1c750356608240 (diff)
Merge pull request #660 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/form')
-rw-r--r--app/models/form/status_batch.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/form/status_batch.rb b/app/models/form/status_batch.rb
index 4f08a3049..8f5fd1fa2 100644
--- a/app/models/form/status_batch.rb
+++ b/app/models/form/status_batch.rb
@@ -23,7 +23,7 @@ class Form::StatusBatch
     media_attached_status_ids = MediaAttachment.where(status_id: status_ids).pluck(:status_id)
 
     ApplicationRecord.transaction do
-      Status.where(id: media_attached_status_ids).find_each do |status|
+      Status.where(id: media_attached_status_ids).reorder(nil).find_each do |status|
         status.update!(sensitive: sensitive)
         log_action :update, status
       end
@@ -35,7 +35,7 @@ class Form::StatusBatch
   end
 
   def delete_statuses
-    Status.where(id: status_ids).find_each do |status|
+    Status.where(id: status_ids).reorder(nil).find_each do |status|
       RemovalWorker.perform_async(status.id)
       log_action :destroy, status
     end