Skip to content

Commit 18177c6

Browse files
committed
Fix error in footer when no collection exists
Footer was using `collection_creation_date_string` which computes the date and calls strftime. New version correctly uses `collection_creation_date` which takes care of the "Never" case.
1 parent 7c5cd75 commit 18177c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/views/shared/_footer.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
and the
3737
<a href="https://www.lib.umich.edu/library-administration/library-copyright-statement">U-M Library Copyright
3838
Policy</a>.
39-
Data last refreshed <%= if Dromedary::Services[:looks_like_first_upload] or Dromedary.collection_creation_date_string =~ /never/i
39+
Data last refreshed <%= if Dromedary::Services[:looks_like_first_upload]
4040
"never"
4141
else
42-
Dromedary.collection_creation_date_string
42+
Dromedary.collection_creation_date
4343
end
4444
%>.
4545
</p>

config/load_local_config.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def hyp_to_bibid
4040
end
4141

4242
def collection_creation_date
43-
Rails.logger.warn "################# Fetching creation date ########################"
43+
Rails.logger.debug "################# Fetching creation date ########################"
4444
collection = Dromedary::Services[:solr_current_collection]
4545
if collection
4646
Dromedary.compute_collection_creation_date collection.collection.name

0 commit comments

Comments
 (0)