From fc6a4fc81e9dd3c0e7dc9fb2242df9f43fc7248b Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Tue, 23 Aug 2016 07:42:19 +0200 Subject: [PATCH] Error 500 when a link to another folder is in the folder/project #565 --- app/views/dmsf/_dir.html.erb | 2 +- app/views/dmsf/_dir_trash.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/dmsf/_dir.html.erb b/app/views/dmsf/_dir.html.erb index 4a136309..b11c3af7 100644 --- a/app/views/dmsf/_dir.html.erb +++ b/app/views/dmsf/_dir.html.erb @@ -32,7 +32,7 @@ <%= link_to(h(title), dmsf_folder_path(:id => project, :folder_id => subfolder), :class => 'icon icon-folder', - :title => h(subfolder.description)) %> + :title => subfolder ? h(subfolder.description) : nil) %> <% if link %>
<%= link.path %>
<% else %> diff --git a/app/views/dmsf/_dir_trash.html.erb b/app/views/dmsf/_dir_trash.html.erb index 3a742703..77554df9 100644 --- a/app/views/dmsf/_dir_trash.html.erb +++ b/app/views/dmsf/_dir_trash.html.erb @@ -24,7 +24,7 @@ :title => l(:title_check_for_restore_or_delete), :id => "subfolder_#{id}") %> <%= content_tag(:span, h(title), - :title => h(subfolder.description), + :title => subfolder ? h(subfolder.description) : nil, :class => 'icon icon-folder') %> <% if link %>
<%= link.path %>