summaryrefslogtreecommitdiff
path: root/app/views/admin/projects
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-05-16 12:30:42 +0200
committerRémy Coutable <remy@rymai.me>2019-05-16 14:59:21 +0200
commitec07641435e9d49686c3eefd9d698caf1b2115dd (patch)
tree8a2be41c3c087cbd60e0546f4ac80f7734537835 /app/views/admin/projects
parentfcc810a1d91d0c2e6cf9726b943e06ee64b97a60 (diff)
downloadgitlab-ce-ec07641435e9d49686c3eefd9d698caf1b2115dd.tar.gz
Fix an error in projects admin when statistics are missing
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/admin/projects')
-rw-r--r--app/views/admin/projects/_projects.html.haml2
-rw-r--r--app/views/admin/projects/show.html.haml8
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: