Commit 0f02ce35 authored by Robert Speicher's avatar Robert Speicher

Ensure a job preloads the project's namespace to avoid N+1

parent c0c58167
...@@ -54,7 +54,7 @@ module API ...@@ -54,7 +54,7 @@ module API
pipeline = user_project.pipelines.find(params[:pipeline_id]) pipeline = user_project.pipelines.find(params[:pipeline_id])
builds = pipeline.builds builds = pipeline.builds
builds = filter_builds(builds, params[:scope]) builds = filter_builds(builds, params[:scope])
builds = builds.preload(:job_artifacts_archive) builds = builds.preload(:job_artifacts_archive, project: [:namespace])
present paginate(builds), with: Entities::Job present paginate(builds), with: Entities::Job
end end
......
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