about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/report.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/report.rb b/app/models/report.rb
index c7d887745..d813d0d0d 100644
--- a/app/models/report.rb
+++ b/app/models/report.rb
@@ -13,10 +13,6 @@ class Report < ApplicationRecord
   end
 
   def media_attachments
-    media_attachments = []
-    statuses.each do |s|
-      media_attachments.concat s.media_attachments
-    end
-    media_attachments
+    MediaAttachment.where(status_id: status_ids)
   end
 end