From 9b08365ea58b0e4839c9c306f57970cbfe26b0b0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 13 Dec 2016 19:47:29 +0000 Subject: [PATCH] Make it work for 0 projects (#24587). git-svn-id: http://svn.redmine.org/redmine/trunk@16070 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/custom_fields/_index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') %> -- 2.39.5