From 574bf6815d6c84d8e2cb02d59809022554b33e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Thu, 18 Jul 2024 06:06:51 +0200 Subject: [PATCH] Undefined size method for nil class --- app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb | 2 +- app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb b/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb index 79c12d74..a37b0eb6 100644 --- a/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb @@ -23,7 +23,7 @@
<%= l(:label_dmsf_file_plural) %> <% issue.dmsf_files.each do |f| %> <%= link_to h(f.name), static_dmsf_file_url(f, filename: f.name) %> - (<%= number_to_human_size(f.last_revision.size) %>)
+ (<%= number_to_human_size(f.last_revision.size) if f.last_revision %>)
<% end %>
<% end %> diff --git a/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb b/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb index dd93622e..b3b5d8cc 100644 --- a/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb +++ b/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb @@ -21,6 +21,6 @@ <% if issue.dmsf_files.any? %> ---<%= l(:label_dmsf_file_plural).ljust(37, '-') %> <% issue.dmsf_files.each do |f| %> - <%= f.name %> (<%= number_to_human_size(f.last_revision.size) %>) + <%= f.name %> (<%= number_to_human_size(f.last_revision.size) if f.last_revision %>) <% end %> <% end %>