diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 18:25:35 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 18:25:35 +0100 |
commit | e4da8b11a2222a4ef12025e08b250a5c78dfa2c9 (patch) | |
tree | 47469176145b009cae55d5093a9abc927f626253 | |
parent | 0d15c8b3d489e27fe410f266456c5325e416730c (diff) | |
download | gitlab-ce-e4da8b11a2222a4ef12025e08b250a5c78dfa2c9.tar.gz |
Include pipeline-related resources if using relation
-rw-r--r-- | app/serializers/pipeline_serializer.rb | 4 |
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 |