Include pipeline-related resources if using relation
This commit is contained in:
parent
0d15c8b3d4
commit
e4da8b11a2
1 changed files with 1 additions and 3 deletions
|
@ -5,12 +5,10 @@ class PipelineSerializer < BaseSerializer
|
|||
Struct.new('Pagination', :request, :response)
|
||||
|
||||
def represent(resource, opts = {})
|
||||
resource = resource.includes(project: :namespace)
|
||||
|
||||
if paginated?
|
||||
raise InvalidResourceError unless resource.respond_to?(:page)
|
||||
|
||||
super(paginate(resource), opts)
|
||||
super(paginate(resource.includes(project: :namespace)), opts)
|
||||
else
|
||||
super(resource, opts)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue