From da9eb6eda819e393753c93a8709b6fe35dd7bf88 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 29 Apr 2022 20:25:31 +0200 Subject: [PATCH] Fix error on attempting to delete an account moderation note (#18196) Fixes #18193 --- app/views/admin/report_notes/_report_note.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/admin/report_notes/_report_note.html.haml b/app/views/admin/report_notes/_report_note.html.haml index f9d57c2ae3..3bccd3b4bc 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