Commit 7547e865 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use preload because we don't want join here

parent ce55999b
...@@ -13,7 +13,7 @@ class PipelineSerializer < BaseSerializer ...@@ -13,7 +13,7 @@ class PipelineSerializer < BaseSerializer
def represent(resource, opts = {}) def represent(resource, opts = {})
if resource.is_a?(ActiveRecord::Relation) if resource.is_a?(ActiveRecord::Relation)
resource = resource.includes([ resource = resource.preload([
:retryable_builds, :retryable_builds,
:cancelable_statuses, :cancelable_statuses,
:trigger_requests, :trigger_requests,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment