File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,10 @@ def file_set_entry_class
283
283
CsvFileSetEntry
284
284
end
285
285
286
+ def valid_entry_types
287
+ [ 'Bulkrax::CsvCollectionEntry' , 'Bulkrax::CsvFileSetEntry' , 'Bulkrax::CsvEntry' ]
288
+ end
289
+
286
290
# TODO: figure out why using the version of this method that's in the bagit parser
287
291
# breaks specs for the "if importer?" line
288
292
def total
@@ -325,6 +329,7 @@ def write_files
325
329
require 'open-uri'
326
330
folder_count = 0
327
331
sorted_entries = sort_entries ( importerexporter . entries . uniq ( &:identifier ) )
332
+ . select { |e | valid_entry_types . include? ( e . type ) }
328
333
329
334
sorted_entries [ 0 ..limit || total ] . in_groups_of ( records_split_count , false ) do |group |
330
335
folder_count += 1
@@ -391,12 +396,12 @@ def sort_entries(entries)
391
396
# always export models in the same order: work, collection, file set
392
397
entries . sort_by do |entry |
393
398
case entry . type
394
- when 'Bulkrax::CsvEntry'
395
- '0'
396
399
when 'Bulkrax::CsvCollectionEntry'
397
400
'1'
398
401
when 'Bulkrax::CsvFileSetEntry'
399
402
'2'
403
+ else
404
+ '0'
400
405
end
401
406
end
402
407
end
You can’t perform that action at this time.
0 commit comments