From a1bdbe3d416015ea1063a69fd1fc55d779c2571c Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Thu, 31 Aug 2017 11:24:36 -0700 Subject: [PATCH] fix DIGREPO-805 --- app/views/catalog/_file_sets_list.html.erb | 2 +- app/views/catalog/_files.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/catalog/_file_sets_list.html.erb b/app/views/catalog/_file_sets_list.html.erb index 4581a9dc0..ee162a3fb 100644 --- a/app/views/catalog/_file_sets_list.html.erb +++ b/app/views/catalog/_file_sets_list.html.erb @@ -1,4 +1,4 @@ -<% if document.file_sets.present? %> +<% if document.file_sets.present? && document.file_sets.any? { |fs| fs["original_filename_ss"].present? } %> <% if can?(:read, document) %> <%= render 'files', document: document %> <% else %> diff --git a/app/views/catalog/_files.html.erb b/app/views/catalog/_files.html.erb index 76aa047cb..7f112aff1 100644 --- a/app/views/catalog/_files.html.erb +++ b/app/views/catalog/_files.html.erb @@ -6,7 +6,7 @@ - <% files = document.file_sets %> + <% files = document.file_sets.select { |fs| fs["original_filename_ss"].present? } %> <% # FIXME: right now we're assuming the first file is the ETD. Once we upgrade to RDF there may not be guaranteed ordering. %> <% file_set = files.shift %>