From: Jean-Philippe Lang Date: Tue, 13 Dec 2016 19:47:29 +0000 (+0000) Subject: Make it work for 0 projects (#24587). X-Git-Tag: 3.4.0~506 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9b08365ea58b0e4839c9c306f57970cbfe26b0b0;p=redmine.git Make it work for 0 projects (#24587). git-svn-id: http://svn.redmine.org/redmine/trunk@16070 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/custom_fields/_index.html.erb b/app/views/custom_fields/_index.html.erb index 0a5ff3ee1..dfc458cdc 100644 --- a/app/views/custom_fields/_index.html.erb +++ b/app/views/custom_fields/_index.html.erb @@ -18,7 +18,7 @@ <%= checked_image custom_field.is_required? %> <% if tab[:name] == 'IssueCustomField' %> <%= checked_image custom_field.is_for_all? %> - <%= l(:label_x_projects, :count => @custom_fields_projects_count[custom_field.id]) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %> + <%= l(:label_x_projects, :count => @custom_fields_projects_count[custom_field.id] || 0) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %> <% end %> <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>