summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-05 18:25:35 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-01-05 18:25:35 +0100
commite4da8b11a2222a4ef12025e08b250a5c78dfa2c9 (patch)
tree47469176145b009cae55d5093a9abc927f626253
parent0d15c8b3d489e27fe410f266456c5325e416730c (diff)
downloadgitlab-ce-e4da8b11a2222a4ef12025e08b250a5c78dfa2c9.tar.gz
Include pipeline-related resources if using relation
-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