Skip to content

Commit

Permalink
correctly display error_messages from db in api. datacite/lupo#648
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 5, 2020
1 parent ff22b95 commit 883b2be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/serializers/claim_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ class ClaimSerializer
end

attribute :error_messages do |object|
Array.wrap(object.error_messages)
if object.error_messages.is_a?(String)
eval(object.error_messages)
else
Array.wrap(object.error_messages)
end
end

attribute :state do |object|
Expand Down

0 comments on commit 883b2be

Please sign in to comment.