summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-05 14:23:49 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-05 14:23:49 +0100
commitb5dfd03efc1769240b20f0e53ff92e2b2319cbc7 (patch)
tree6cc5a20804c6d620202fdc5c0e2ec47408a6b56f /app/serializers
parentae5dc479e7fdabe61900b2763500cc6c6551e2c7 (diff)
downloadgitlab-ce-b5dfd03efc1769240b20f0e53ff92e2b2319cbc7.tar.gz
Include resources to speed up pipelines serializer
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/pipeline_serializer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 2de34758f1f..0d14858ce53 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -5,6 +5,8 @@ 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)