From 4db893177e00ac01f29cf427e040c18a29fd9c44 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Wed, 17 Jul 2019 19:18:19 +0200 Subject: [PATCH] keep error handling for base64 encoding --- app/serializers/doi_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/doi_serializer.rb b/app/serializers/doi_serializer.rb index ba81de691..db6c1b7a4 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -12,7 +12,7 @@ class DoiSerializer has_many :media, if: Proc.new { |object, params| params && params[:detail] } attribute :xml, if: Proc.new { |object, params| params && params[:detail] } do |object| - Base64.strict_encode64(object.xml) if object.xml.present? + xml_encoded end attribute :doi do |object|