diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index b92e6dece..521f824ab 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -244,6 +244,7 @@ def index options[:params] = { current_ability: current_ability, detail: params[:detail], + composite: params[:composite], affiliation: params[:affiliation], is_collection: options[:is_collection], } @@ -292,6 +293,7 @@ def show options[:params] = { current_ability: current_ability, detail: true, + composite: nil, affiliation: params[:affiliation], } diff --git a/app/serializers/doi_serializer.rb b/app/serializers/doi_serializer.rb index f104b9a36..0dcd355cc 100644 --- a/app/serializers/doi_serializer.rb +++ b/app/serializers/doi_serializer.rb @@ -72,7 +72,7 @@ class DoiSerializer Array.wrap(object.identifiers) end - attribute :related_identifiers do |object| + attribute :related_identifiers, if: Proc.new { |object, params| params && params[:composite].blank? } do |object| Array.wrap(object.related_identifiers) end