Commit e4da8b11 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Include pipeline-related resources if using relation

parent 0d15c8b3
...@@ -5,12 +5,10 @@ class PipelineSerializer < BaseSerializer ...@@ -5,12 +5,10 @@ class PipelineSerializer < BaseSerializer
Struct.new('Pagination', :request, :response) Struct.new('Pagination', :request, :response)
def represent(resource, opts = {}) def represent(resource, opts = {})
resource = resource.includes(project: :namespace)
if paginated? if paginated?
raise InvalidResourceError unless resource.respond_to?(:page) raise InvalidResourceError unless resource.respond_to?(:page)
super(paginate(resource), opts) super(paginate(resource.includes(project: :namespace)), opts)
else else
super(resource, opts) super(resource, opts)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment