summaryrefslogtreecommitdiff
path: root/app/models/namespace/root_storage_statistics.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-25 12:11:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-25 12:11:01 +0000
commitb2452a369250083ed416b90fe233583c64413877 (patch)
treecd02c529abe78b8879ad2de2a3bff887cea94092 /app/models/namespace/root_storage_statistics.rb
parentbcfab67c0f33aeda96041f341f92cf0ff1e062d3 (diff)
downloadgitlab-ce-b2452a369250083ed416b90fe233583c64413877.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace/root_storage_statistics.rb')
-rw-r--r--app/models/namespace/root_storage_statistics.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/namespace/root_storage_statistics.rb b/app/models/namespace/root_storage_statistics.rb
index 90aeee7a4f1..0c91ae760b2 100644
--- a/app/models/namespace/root_storage_statistics.rb
+++ b/app/models/namespace/root_storage_statistics.rb
@@ -57,8 +57,7 @@ class Namespace::RootStorageStatistics < ApplicationRecord
end
def attributes_from_personal_snippets
- # Return if the type of namespace does not belong to a user
- return {} unless namespace.type.nil?
+ return {} unless namespace.user?
from_personal_snippets.take.slice(SNIPPETS_SIZE_STAT_NAME)
end
@@ -70,3 +69,5 @@ class Namespace::RootStorageStatistics < ApplicationRecord
.select("COALESCE(SUM(s.repository_size), 0) AS #{SNIPPETS_SIZE_STAT_NAME}")
end
end
+
+Namespace::RootStorageStatistics.prepend_if_ee('EE::Namespace::RootStorageStatistics')