Skip to content

Commit

Permalink
Always serialize titles to be an array of titles.
Browse files Browse the repository at this point in the history
This works the same as descriptions and other attributes.
  • Loading branch information
richardhallett committed Sep 21, 2021
1 parent 4afe54d commit 2217fd5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/serializers/datacite_doi_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ class DataciteDoiSerializer
Array.wrap(object.sizes)
end

attribute :titles do |object|
Array.wrap(object.titles)
end

attribute :descriptions do |object|
Array.wrap(object.descriptions)
end
Expand Down

0 comments on commit 2217fd5

Please sign in to comment.