diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-16 16:42:39 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-16 16:42:39 +0300 |
commit | 167b7641a56804f819c01d04818c5b8d8269aa6d (patch) | |
tree | dd3d43525f92380b34d3a64212c786bff08afee6 /app/views | |
parent | 8214d031d3f6172094648a97bfb31642ba6efd08 (diff) | |
parent | ec07641435e9d49686c3eefd9d698caf1b2115dd (diff) |
Merge branch '49915-fix-error-500-admin-projects-nil-storage' into 'master'
Resolve "Error 500 viewing admin/projects page: undefined method `storage_size' for nil:NilClass"
Closes #49915
See merge request gitlab-org/gitlab-ce!28355
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/projects/_projects.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/projects/show.html.haml | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 5bc695aa7b5..9117f63f939 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -13,7 +13,7 @@ .stats %span.badge.badge-pill - = storage_counter(project.statistics.storage_size) + = storage_counter(project.statistics&.storage_size) - if project.archived %span.badge.badge-warning archived .title diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index f016a157daf..1e1ad9d5e19 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -74,10 +74,10 @@ %li %span.light= _('Storage:') - %strong= storage_counter(@project.statistics.storage_size) - ( - = storage_counters_details(@project.statistics) - ) + %strong= storage_counter(@project.statistics&.storage_size) + - if @project.statistics + = surround '(', ')' do + = storage_counters_details(@project.statistics) %li %span.light last commit: |