Skip to content

Commit

Permalink
Merge pull request #1393 from alphagov/org-filter
Browse files Browse the repository at this point in the history
Show organisation slug if organisation is not in Solr
  • Loading branch information
AgaDufrat authored Jan 3, 2025
2 parents 2e16e50 + fce3646 commit 53135f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/presenters/search_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def organisations
slugs = facet_values("organization")

results_organisations = slugs.map do |slug|
Search::Solr.get_organisation(slug)["response"]["docs"].first["title"]
org = Search::Solr.get_organisation(slug)["response"]["docs"].first
org.present? ? org["title"] : slug
end

results_organisations.sort
Expand Down

0 comments on commit 53135f8

Please sign in to comment.