From 0b33cdcaac6648e317fd67b18d993c546a578394 Mon Sep 17 00:00:00 2001 From: Alisha Evans Date: Fri, 21 Apr 2023 17:10:44 -0500 Subject: [PATCH] fix bagit exporting (#798) find the correct entry type by the entry class when exporting with bagit. @work_ids, @collection_ids and @file_set_ids no longer exist as of #749 --- app/parsers/bulkrax/bagit_parser.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/parsers/bulkrax/bagit_parser.rb b/app/parsers/bulkrax/bagit_parser.rb index 005e894a..eccbee16 100644 --- a/app/parsers/bulkrax/bagit_parser.rb +++ b/app/parsers/bulkrax/bagit_parser.rb @@ -95,9 +95,9 @@ def write_files folder_count = 1 records_in_folder = 0 - work_entries = importerexporter.entries.where(identifier: @work_ids) - collection_entries = importerexporter.entries.where(identifier: @collection_ids) - file_set_entries = importerexporter.entries.where(identifier: @file_set_ids) + work_entries = importerexporter.entries.where(type: work_entry_class.to_s) + collection_entries = importerexporter.entries.where(type: collection_entry_class.to_s) + file_set_entries = importerexporter.entries.where(type: file_set_entry_class.to_s) work_entries[0..limit || total].each do |entry| record = ActiveFedora::Base.find(entry.identifier)