]> source.dussan.org Git - redmine.git/commitdiff
Make it work for 0 projects (#24587).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 13 Dec 2016 19:47:29 +0000 (19:47 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 13 Dec 2016 19:47:29 +0000 (19:47 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16070 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/custom_fields/_index.html.erb

index 0a5ff3ee140195eeb007ca9fd08872602967d787..dfc458cdcb9d2e9d233e03630aecabb4eae2abec 100644 (file)
@@ -18,7 +18,7 @@
       <td><%= checked_image custom_field.is_required? %></td>
       <% if tab[:name] == 'IssueCustomField' %>
       <td><%= checked_image custom_field.is_for_all? %></td>
-      <td><%= l(:label_x_projects, :count => @custom_fields_projects_count[custom_field.id]) if custom_field.is_a? IssueCustomField and !custom_field.is_for_all? %></td>
+      <td><%= 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? %></td>
       <% end %>
       <td class="buttons">
         <%= reorder_handle(custom_field, :url => custom_field_path(custom_field), :param => 'custom_field') %>