Skip to content

Commit

Permalink
use portal_api and portal_ui in counting federation results instead o…
Browse files Browse the repository at this point in the history
…f portal_name
  • Loading branch information
Bilelkihal committed Nov 26, 2024
1 parent 5f460ff commit 9fc4731
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/helpers/federation_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ def counts_ontology_ids_by_portal_name(portals_ids)
counts[current_portal.downcase] += 1 if id.include?(current_portal.to_s.downcase)

federation_portals.each do |portal|
portal_api = federated_portals[portal.downcase.to_sym][:name].downcase
counts[portal.downcase] += 1 if id.include?(portal_api)
portal_api = federated_portals[portal.downcase.to_sym][:api].sub(/^https?:\/\//, '')
portal_ui = federated_portals[portal.downcase.to_sym][:ui].sub(/^https?:\/\//, '')
counts[portal.downcase] += 1 if (id.include?(portal_api) || id.include?(portal_ui))
end
end

Expand Down

0 comments on commit 9fc4731

Please sign in to comment.