From 4cf9f56af7742493973f350dc9fee18df2b0ee1f Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 20 Jul 2019 09:40:19 +0200 Subject: [PATCH] make sure rights_list is an array. #309 --- 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 bb68b5c4d..ef13fe9bf 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -53,6 +53,10 @@ class DoiSerializer end.compact end + attribute :rights_list do |object| + Array.wrap(object.rights_list) + end + attribute :state do |object| object.aasm_state end