diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 14:23:49 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-05 14:23:49 +0100 |
commit | b5dfd03efc1769240b20f0e53ff92e2b2319cbc7 (patch) | |
tree | 6cc5a20804c6d620202fdc5c0e2ec47408a6b56f /app/serializers | |
parent | ae5dc479e7fdabe61900b2763500cc6c6551e2c7 (diff) | |
download | gitlab-ce-b5dfd03efc1769240b20f0e53ff92e2b2319cbc7.tar.gz |
Include resources to speed up pipelines serializer
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/pipeline_serializer.rb | 2 |
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) |