about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-08-21 12:25:50 +0200
committerGitHub <noreply@github.com>2018-08-21 12:25:50 +0200
commitd98de8ada743886c3cd48b2ad942d46b805af7a9 (patch)
tree9c7551f7b60a7884929e259e85d91f14c6602395 /app/models
parent83746b63646088396232a348f4024b101f39c78a (diff)
Get rid of all batch order warnings (#8334)
Diffstat (limited to 'app/models')
-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