diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2019-06-19 14:50:42 +0200 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2019-06-19 14:50:42 +0200 |
commit | d134769c5326dff6bc1134a1d183e99f4b36b96c (patch) | |
tree | 456ab680e7ab0454bccd2792bf60c9200aba9ddb | |
parent | 110478466ab85ac7a7ff69cd6dee300169b05128 (diff) | |
download | gitlab-ce-ac-root-namespace-statistics.tar.gz |
Remove unused OR conditionac-root-namespace-statistics
-rw-r--r-- | app/models/namespace/root_storage_statistics.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb index 4754ab83f25..d5734aca4e0 100644 --- a/app/models/namespace/root_storage_statistics.rb +++ b/app/models/namespace/root_storage_statistics.rb @@ -25,12 +25,9 @@ class Namespace::RootStorageStatistics < ApplicationRecord ) end - def from_project_statistics_or_initialize - from_project_statistics.take || self.class.new - end - def attributes_from_project_statistics - from_project_statistics_or_initialize + from_project_statistics + .take .attributes .slice(*%w[storage_size repository_size wiki_size lfs_objects_size build_artifacts_size packages_size]) end |