Skip to content

Commit

Permalink
keep error handling for base64 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jul 17, 2019
1 parent 9b89b18 commit 4db8931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/serializers/doi_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down

0 comments on commit 4db8931

Please sign in to comment.