summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/pipeline_serializer.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 0d14858ce53..cfa86cc2553 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -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