Skip to content

Commit

Permalink
handle affiliation versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jul 14, 2019
1 parent 9db4be4 commit 3ab3323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/serializers/doi_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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["affiliation"].is_a?(Hash)
c
end
else
Expand Down

0 comments on commit 3ab3323

Please sign in to comment.