diff options
Diffstat (limited to 'app/models/project_statistics.rb')
-rw-r--r-- | app/models/project_statistics.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/project_statistics.rb b/app/models/project_statistics.rb index 387732cf151..99cec647a98 100644 --- a/app/models/project_statistics.rb +++ b/app/models/project_statistics.rb @@ -31,7 +31,6 @@ class ProjectStatistics < ApplicationRecord scope :for_project_ids, ->(project_ids) { where(project_id: project_ids) } scope :for_namespaces, -> (namespaces) { where(namespace: namespaces) } - scope :with_any_ci_minutes_used, -> { where.not(shared_runners_seconds: 0) } def total_repository_size repository_size + lfs_objects_size @@ -70,7 +69,7 @@ class ProjectStatistics < ApplicationRecord end def update_lfs_objects_size - self.lfs_objects_size = project.lfs_objects.sum(:size) + self.lfs_objects_size = LfsObject.joins(:lfs_objects_projects).where(lfs_objects_projects: { project_id: project.id }).sum(:size) end def update_uploads_size |