Skip to content

Commit

Permalink
Merge pull request #570 from CDLUC3/fix-double-ror
Browse files Browse the repository at this point in the history
Fix issue with typeahead results duplicating the ROR URL
  • Loading branch information
briri authored May 13, 2024
2 parents b01dc3c + 667b2c1 commit 88f3247
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/branded/api/v3/orgs/_show.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ if org.is_a?(RegistryOrg)
else
json.affiliation_id do
json.type 'ror'
json.identifier "https://ror.org/#{org.ror_id}"
ror_id = org.ror_id.gsub(%r{https?://}, '').gsub('ror.org', '')
ror_id = ror_id.start_with?('/') ? ror_id : "/#{ror_id}"
json.identifier "https://ror.org#{ror_id}"
end
end

Expand Down

0 comments on commit 88f3247

Please sign in to comment.