diff --git a/app/presenters/specialist_document_presenter.rb b/app/presenters/specialist_document_presenter.rb index f49c82b64..af67438fd 100644 --- a/app/presenters/specialist_document_presenter.rb +++ b/app/presenters/specialist_document_presenter.rb @@ -103,17 +103,8 @@ def value_or_array_of_values(values) values.length == 1 ? values.first : values end - # Finder is a required link that must have 1 item def finder - parent_finder = content_item.dig("links", "finder", 0) - if parent_finder.nil? - GovukError.notify( - "Finder not found", - extra: { error_message: "Finder not found in #{base_path} content item" }, - ) - end - - parent_finder + content_item.dig("links", "finder", 0) end def facets diff --git a/test/presenters/specialist_document_presenter_test.rb b/test/presenters/specialist_document_presenter_test.rb index 42374df11..30a31eb9d 100644 --- a/test/presenters/specialist_document_presenter_test.rb +++ b/test/presenters/specialist_document_presenter_test.rb @@ -295,18 +295,6 @@ def example_facet(overrides = {}) assert_equal "1 January 2010", presented_metadata["Facet name"] end - test "sends an error notification when there is no finder" do - example = schema_item("aaib-reports") - example["links"]["finder"] = [] - - GovukError.expects(:notify).with( - "Finder not found", - extra: { error_message: "Finder not found in /aaib-reports/aaib-investigation-to-rotorsport-uk-calidus-g-pcpc content item" }, - ) - - present_example(example).important_metadata - end - test "omits first_published_at facet values from `other` section of component parameters to avoid duplicates" do facets = [ {