From be84ca06b58cdc057c44b8bd471bb8b6119208c1 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 17 Jul 2020 15:30:05 +0200 Subject: [PATCH] make sure doi descriptions are always an array #581 --- app/serializers/doi_serializer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/serializers/doi_serializer.rb b/app/serializers/doi_serializer.rb index e35a5921d..1cb877fdf 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -98,6 +98,10 @@ class DoiSerializer Array.wrap(object.sizes) end + attribute :descriptions do |object| + Array.wrap(object.descriptions) + end + attribute :formats do |object| Array.wrap(object.formats) end