Skip to content

Commit

Permalink
exclude doi as url as alternate identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 17, 2020
1 parent e8c784c commit 5babfe3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/graphql/types/doi_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def descriptions(first: nil)
end

def identifiers
Array.wrap(object.identifiers).select { |r| [object.doi, object.url].exclude?(r["identifier"]) }
Array.wrap(object.identifiers).select { |r| [doi_from_url(object.doi), object.url].compact.exclude?(r["identifier"]) }
end

def bibtex
Expand Down

0 comments on commit 5babfe3

Please sign in to comment.