Skip to content

Commit

Permalink
fix the choice of the canonical portal, to be using the list of the r…
Browse files Browse the repository at this point in the history
…equest portals instead of all portals (#913)
  • Loading branch information
Bilelkihal authored Jan 11, 2025
1 parent db5694a commit 2f40a39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/federation_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ def external_canonical_ontology_portal(ontologies)
def most_referred_portal(ontology_submissions)
portal_counts = Hash.new(0)
ontology_submissions.each do |submission|
federated_portals.keys.each do |portal|
portal_counts[portal] += 1 if submission[:pullLocation]&.include?(portal.to_s)
request_portals.each do |portal|
portal_counts[portal.downcase] += 1 if submission[:pullLocation]&.include?(portal.downcase)
end
end
portal_counts.max_by { |_, count| count }&.first
Expand Down

0 comments on commit 2f40a39

Please sign in to comment.