diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-01-17 16:29:31 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-01-17 21:50:09 -0200 |
commit | 4bb3675b7d48e5215b63b3e94063188b719c59ea (patch) | |
tree | e7b2387008caf39cd3f75e36921dd31e34d6dfc9 /app/models/project_statistics.rb | |
parent | 65046d9a5e84defb1bd0a0508e085a8cc023bc6f (diff) | |
download | gitlab-ce-4bb3675b7d48e5215b63b3e94063188b719c59ea.tar.gz |
Fix Project#update_repository_size to convert MB to Bytes properly26773-fix-project-statistics-repository-size
Diffstat (limited to 'app/models/project_statistics.rb')
-rw-r--r-- | app/models/project_statistics.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project_statistics.rb b/app/models/project_statistics.rb index 2270ac75071..06abd406523 100644 --- a/app/models/project_statistics.rb +++ b/app/models/project_statistics.rb @@ -25,8 +25,9 @@ class ProjectStatistics < ActiveRecord::Base self.commit_count = project.repository.commit_count end + # Repository#size needs to be converted from MB to Byte. def update_repository_size - self.repository_size = project.repository.size + self.repository_size = project.repository.size * 1.megabyte end def update_lfs_objects_size |