diff --git a/app/serializers/datacite_doi_serializer.rb b/app/serializers/datacite_doi_serializer.rb index 906d8d73e..36c897f28 100644 --- a/app/serializers/datacite_doi_serializer.rb +++ b/app/serializers/datacite_doi_serializer.rb @@ -192,7 +192,11 @@ class DataciteDoiSerializer end attribute :related_items do |object| - Array.wrap(object.related_items) + if object.related_items? + Array.wrap(object.related_items) + else + [] + end end attribute :geo_locations,