diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-09-12 13:16:04 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2019-09-12 13:16:04 +0300 |
commit | 946afebd6602bee772eef5fc9447fb59a7bbd2e1 (patch) | |
tree | 43243ccda31c2bd13c148429c39b5c3e49e2790e /app | |
parent | 54a3ec47e2ef169c998304a4a67d6bc6e66657fb (diff) |
Calculate artifact size properlymc/feature/artifacts-page-backend
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/artifacts_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb index 7424b521cba..54bc3b5c125 100644 --- a/app/controllers/projects/artifacts_controller.rb +++ b/app/controllers/projects/artifacts_controller.rb @@ -17,8 +17,10 @@ class Projects::ArtifactsController < Projects::ApplicationController def index finder = ArtifactsFinder.new(@project, artifacts_params) - @artifacts = finder.execute.page(params[:page]).per(MAX_PER_PAGE) - @total_size = @artifacts.total_size + all_artifacts = finder.execute + + @artifacts = all_artifacts.page(params[:page]).per(MAX_PER_PAGE) + @total_size = all_artifacts.total_size end def destroy |