From 5babfe3f58554538cec80c2c43b13cd8fd0e2613 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 17 Oct 2020 09:49:33 +0200 Subject: [PATCH] exclude doi as url as alternate identifier --- app/graphql/types/doi_item.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/graphql/types/doi_item.rb b/app/graphql/types/doi_item.rb index 8b43306df..c66d30f55 100644 --- a/app/graphql/types/doi_item.rb +++ b/app/graphql/types/doi_item.rb @@ -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