diff --git a/app/serializers/doi_serializer.rb b/app/serializers/doi_serializer.rb index c234fa2b4..50e42f1e9 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -11,10 +11,10 @@ class DoiSerializer belongs_to :client, record_type: :clients has_many :media, record_type: :media, id_method_name: :uid, if: Proc.new { |object, params| params && params[:detail] && !params[:is_collection]} - has_many :references, serializer: DoiSerializer - has_many :citations, serializer: DoiSerializer - has_many :parts, serializer: DoiSerializer - has_many :versions, serializer: DoiSerializer + has_many :references, serializer: DoiSerializer, if: Proc.new { |object, params| params && params[:detail] } + has_many :citations, serializer: DoiSerializer, if: Proc.new { |object, params| params && params[:detail] } + has_many :parts, serializer: DoiSerializer, if: Proc.new { |object, params| params && params[:detail] } + has_many :versions, serializer: DoiSerializer, if: Proc.new { |object, params| params && params[:detail] } attribute :xml, if: Proc.new { |object, params| params && params[:detail] } do |object| begin