summaryrefslogtreecommitdiff
path: root/app/serializers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-04-06 15:35:40 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-04-06 15:36:13 +0200
commit227a664e5e7e6c9c986b4a34ded84fa74af64001 (patch)
treefb22d7a45a68f1c77e538f11c50be6d869488aae /app/serializers
parent93f9e71b0dc47d88f1077ccaeaeb5ea91e51c0fc (diff)
downloadgitlab-ce-227a664e5e7e6c9c986b4a34ded84fa74af64001.tar.gz
Next round
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/pipeline_serializer.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/app/serializers/pipeline_serializer.rb b/app/serializers/pipeline_serializer.rb
index 08a664ad4bf..0af9ef0e3f7 100644
--- a/app/serializers/pipeline_serializer.rb
+++ b/app/serializers/pipeline_serializer.rb
@@ -13,18 +13,15 @@ class PipelineSerializer < BaseSerializer
def represent(resource, opts = {})
if resource.is_a?(ActiveRecord::Relation)
- project_includes = [ { namespace: :route }, :route ]
- resource = resource.includes(
+ resource = resource.includes([
:retryable_builds,
:cancelable_statuses,
- :trigger_requests
- )
- resource = resource.includes(
- project: project_includes,
- pending_builds: [:project],
- manual_actions: { project: project_includes },
- artifacts: { project: project_includes }
- )
+ :trigger_requests,
+ :project,
+ { pending_builds: :project },
+ { manual_actions: :project },
+ { artifacts: :project }
+ ])
end
if paginated?