diff --git a/app/helpers/federation_helper.rb b/app/helpers/federation_helper.rb index 158310d1f..9ceafae5d 100644 --- a/app/helpers/federation_helper.rb +++ b/app/helpers/federation_helper.rb @@ -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