diff --git a/src/api/app/assets/javascripts/webui/report.js b/src/api/app/assets/javascripts/webui/report.js index a286ddb7173..c36602ec29c 100644 --- a/src/api/app/assets/javascripts/webui/report.js +++ b/src/api/app/assets/javascripts/webui/report.js @@ -28,7 +28,7 @@ function setValuesOnReportDialog(modalId) { if (typeof(link.data('reportable-type')) !== 'undefined') { modal.find('#report_reportable_type').val(link.data('reportable-type')); - modal.find('.report_type').text(link.data('reportable-type')); + modal.find('.reportable_type').text(link.data('reportable-type')); } modal.find('#link_id').val(link.attr('id')); diff --git a/src/api/app/components/report_component.rb b/src/api/app/components/report_component.rb index ef6bcf01533..dd772e58d43 100644 --- a/src/api/app/components/report_component.rb +++ b/src/api/app/components/report_component.rb @@ -7,9 +7,5 @@ def initialize(reportable:) @reportable = reportable end - - def render? - policy(Report.new(reportable: @reportable)).create? - end end # rubocop:enable ViewComponent/MissingPreviewFile