Get rid of all batch order warnings (#8334)
This commit is contained in:
parent
83746b6364
commit
d98de8ada7
10 changed files with 19 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue