diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-05-23 14:29:21 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-05-23 14:29:21 +0300 |
commit | dab3ae39a2093fa924daf9c1902a2784002cca63 (patch) | |
tree | 9c183546ec1862740f589ecd47e29edf335db8f6 /app/controllers/projects/pipelines_controller.rb | |
parent | 8cca6c83a99100fcf3a0a3a56f10eebe3c9b7716 (diff) |
Do not paginate pipelines active relation twice
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index 2b758b960c2..768595ceeb4 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -15,7 +15,6 @@ class Projects::PipelinesController < Projects::ApplicationController @pipelines = PipelinesFinder .new(project, scope: @scope) .execute - .preload(:stages) .page(params[:page]) .per(30) @@ -24,8 +23,6 @@ class Projects::PipelinesController < Projects::ApplicationController @finished_count = limited_pipelines_count(project, 'finished') @pipelines_count = limited_pipelines_count(project) - Gitlab::Ci::Pipeline::Preloader.preload!(@pipelines) - respond_to do |format| format.html format.json do @@ -35,7 +32,7 @@ class Projects::PipelinesController < Projects::ApplicationController pipelines: PipelineSerializer .new(project: @project, current_user: @current_user) .with_pagination(request, response) - .represent(@pipelines, disable_coverage: true), + .represent(@pipelines, disable_coverage: true, preload: true), count: { all: @pipelines_count, running: @running_count, |