Skip to content

Commit

Permalink
avoid-ldp-gone-when-writing-files-on-export (#603)
Browse files Browse the repository at this point in the history
return from #store_files in the csv parser if the record is not found
  • Loading branch information
alishaevn authored Jul 19, 2022
1 parent 4b64d39 commit 30347f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/parsers/bulkrax/csv_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ def write_files

def store_files(identifier, folder_count)
record = ActiveFedora::Base.find(identifier)
return unless record

file_sets = record.file_set? ? Array.wrap(record) : record.file_sets
file_sets << record.thumbnail if exporter.include_thumbnails && record.thumbnail.present? && record.work?
file_sets.each do |fs|
Expand Down

0 comments on commit 30347f4

Please sign in to comment.