From 9fc473134cd38c7b357b25f8edd4a9ea14f614fd Mon Sep 17 00:00:00 2001 From: Bilel KIHAL Date: Tue, 26 Nov 2024 14:43:46 +0100 Subject: [PATCH] use portal_api and portal_ui in counting federation results instead of portal_name --- app/helpers/federation_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/helpers/federation_helper.rb b/app/helpers/federation_helper.rb index f6ad775ca..4dc2b3d96 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