diff --git a/app/graphql/types/researcher_type.rb b/app/graphql/types/researcher_type.rb index 8073a6dff..b4a3c3104 100644 --- a/app/graphql/types/researcher_type.rb +++ b/app/graphql/types/researcher_type.rb @@ -22,7 +22,7 @@ class ResearcherType < BaseObject end def id - object.fetch(:id, nil) || object.fetch("nameIdentifiers", []).find { |n| n.fetch("nameIdentifierScheme", nil) == "ORCID" }.fetch("nameIdentifier", nil) + object.fetch(:id, nil) || object.fetch("nameIdentifiers", []).find { |n| n.fetch("nameIdentifierScheme", nil) == "ORCID" }.to_h.fetch("nameIdentifier", nil) end def datasets(**args)