diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 216383ad..e2294682 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -129,19 +129,19 @@ class DmsfFile < ActiveRecord::Base end def description - self.last_revision.description + self.last_revision ? self.last_revision.description : '' end def version - self.last_revision.version + self.last_revision ? self.last_revision.version : '0' end def workflow - self.last_revision.workflow + self.last_revision ? self.last_revision.workflow : nil end def size - self.last_revision.size + self.last_revision ? self.last_revision.size : 0 end def dmsf_path diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index 8235422b..b448740a 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -40,12 +40,16 @@ <%= link_to(image_tag("copy.png"), {:controller => :dmsf_files_copy, :action => "new", :id => @file }, :title => l(:title_copy_or_move)) %> -<% path = @file.folder.nil? ? [] : @file.folder.dmsf_path %> -