Fix error when accepting appeal for sensitive posts deleted in the meantime (#32037)

Co-authored-by: David Roetzel <david@roetzel.de>
This commit is contained in:
Claire 2024-09-24 17:19:55 +02:00 committed by GitHub
parent 0a6b75b71e
commit c36a76b9eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 45 additions and 17 deletions

View file

@ -53,7 +53,7 @@ class ApproveAppealService < BaseService
def undo_mark_statuses_as_sensitive!
representative_account = Account.representative
@strike.statuses.includes(:media_attachments).find_each do |status|
@strike.statuses.kept.includes(:media_attachments).reorder(nil).find_each do |status|
UpdateStatusService.new.call(status, representative_account.id, sensitive: false) if status.with_media?
end
end