]> cat aescling's git repositories - mastodon.git/commitdiff
Fix error on attempting to delete an account moderation note (#18196)
authorClaire <claire.github-309c@sitedethib.com>
Fri, 29 Apr 2022 18:25:31 +0000 (20:25 +0200)
committersingle-right-quote <11325618-aescling@users.noreply.gitlab.com>
Thu, 5 May 2022 17:49:12 +0000 (13:49 -0400)
Fixes #18193

app/views/admin/report_notes/_report_note.html.haml

index f9d57c2ae342dd4fd6d5d17cfa5254a0c000b3a2..3bccd3b4bc55c60b4ad39675a32109389e93909e 100644 (file)
@@ -15,4 +15,7 @@
 
   - if can?(:destroy, report_note)
     .report-notes__item__actions
-      = table_link_to 'trash', t('admin.reports.notes.delete'), admin_report_note_path(report_note), method: :delete
+      - if report_note.is_a?(AccountModerationNote)
+        = table_link_to 'trash', t('admin.reports.notes.delete'), admin_account_moderation_note_path(report_note), method: :delete
+      - else
+        = table_link_to 'trash', t('admin.reports.notes.delete'), admin_report_note_path(report_note), method: :delete