diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 20:25:35 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 20:25:35 +0300 |
commit | e4da8b11a2222a4ef12025e08b250a5c78dfa2c9 (patch) | |
tree | 47469176145b009cae55d5093a9abc927f626253 /app/serializers | |
parent | 0d15c8b3d489e27fe410f266456c5325e416730c (diff) |
Include pipeline-related resources if using relation
Diffstat (limited to 'app/serializers')
-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 |