about summary refs log tree commit diff
path: root/app/views/admin/report_notes
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-04-29 20:25:31 +0200
committerGitHub <noreply@github.com>2022-04-29 20:25:31 +0200
commit5c691430e5f05524523bf32a3fce10633ec37092 (patch)
tree3bc4d4131579b9ea3079ab3827441c8ecf1bdb8d /app/views/admin/report_notes
parent74e20f22cd93ec1fd5e325bd333d417f4d88f7f4 (diff)
Fix error on attempting to delete an account moderation note (#18196)
Fixes #18193
Diffstat (limited to 'app/views/admin/report_notes')
-rw-r--r--app/views/admin/report_notes/_report_note.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin/report_notes/_report_note.html.haml b/app/views/admin/report_notes/_report_note.html.haml
index f9d57c2ae..3bccd3b4b 100644
--- a/app/views/admin/report_notes/_report_note.html.haml
+++ b/app/views/admin/report_notes/_report_note.html.haml
@@ -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