about summary refs log tree commit diff
path: root/app/views/admin/reports
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/reports')
-rw-r--r--app/views/admin/reports/_status.html.haml2
-rw-r--r--app/views/admin/reports/index.html.haml5
2 files changed, 3 insertions, 4 deletions
diff --git a/app/views/admin/reports/_status.html.haml b/app/views/admin/reports/_status.html.haml
index 105352e46..fa15796d2 100644
--- a/app/views/admin/reports/_status.html.haml
+++ b/app/views/admin/reports/_status.html.haml
@@ -15,7 +15,7 @@
       - if status.proper.media_attachments.first.video?
         - video = status.proper.media_attachments.first
         = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.proper.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description
-      - elsif status.media_attachments.first.audio?
+      - elsif status.proper.media_attachments.first.audio?
         - audio = status.proper.media_attachments.first
         = react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration)
       - else
diff --git a/app/views/admin/reports/index.html.haml b/app/views/admin/reports/index.html.haml
index 30c7549b0..0263b80fb 100644
--- a/app/views/admin/reports/index.html.haml
+++ b/app/views/admin/reports/index.html.haml
@@ -10,9 +10,8 @@
 
 = form_tag admin_reports_url, method: 'GET', class: 'simple_form' do
   .fields-group
-    - Admin::FilterHelper::REPORT_FILTERS.each do |key|
-      - if params[key].present?
-        = hidden_field_tag key, params[key]
+    - ReportFilter::KEYS.each do |key|
+      = hidden_field_tag key, params[key] if params[key].present?
 
     - %i(by_target_domain).each do |key|
       .input.string.optional