diff --git a/app/serializers/doi_serializer.rb b/app/serializers/doi_serializer.rb index 59a3c156a..15211020a 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -24,7 +24,7 @@ class DoiSerializer # for now override format for affiliations in production if Rails.env.production? Array.wrap(object.creators).map do |c| - c["affiliation"] = c.dig("affiliation", "name") if c.has_key("affiliation") + c["affiliation"] = c.dig("affiliation", "name") if c.has_key?("affiliation") c end else