Skip to content

Commit

Permalink
Merge pull request #357 from DigitalWPI/ris_export_nil_date_fix
Browse files Browse the repository at this point in the history
added check on date_created field for nil to avoid error on gsub
  • Loading branch information
dfmurphy-wpi authored Apr 6, 2022
2 parents 5d8f8ec + f340042 commit 6ce84aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/hyrax/solr_document/export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def ris_format
"A2" => contributor,
"AB" => description,
"CY" => based_near_label,
"DA" => date_created[0].gsub('-','/'),
"DA" => (date_created[0].gsub('-','/') unless date_created[0].nil?),
"DB" => I18n.t('hyrax.product_name'),
"DP" => Institution.name_full,
"ID" => identifier,
Expand Down

0 comments on commit 6ce84aa

Please sign in to comment.