diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-13 15:51:40 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-13 15:51:40 -0600 |
commit | aab978cca1aed46c8430b4b906a667010e74935e (patch) | |
tree | 7627b5218b21563f0cda8c9b9c8812e55c7f5289 /app/models/form | |
parent | 8ef0a2ab621266b45873e1832de657ea8d91a76f (diff) |
allow moderators to change sensitive content flag on posts without media attachments
Diffstat (limited to 'app/models/form')
-rw-r--r-- | app/models/form/status_batch.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/form/status_batch.rb b/app/models/form/status_batch.rb index 933dfdaca..ceae06023 100644 --- a/app/models/form/status_batch.rb +++ b/app/models/form/status_batch.rb @@ -18,10 +18,8 @@ class Form::StatusBatch private def change_sensitive(sensitive) - media_attached_status_ids = MediaAttachment.where(status_id: status_ids).pluck(:status_id) - ApplicationRecord.transaction do - Status.where(id: media_attached_status_ids).reorder(nil).find_each do |status| + Status.where(id: status_ids).reorder(nil).find_each do |status| status.update!(sensitive: sensitive) log_action :update, status end |