Skip to content

Commit

Permalink
Merge pull request #5739 from avalonmediasystem/update_caption_migration
Browse files Browse the repository at this point in the history
Set caption language to system default when migrating
  • Loading branch information
masaball authored Mar 25, 2024
2 parents 532898e + a782401 commit 68f955d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/avalon_migrations.rake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace :avalon do
filename = caption_file.original_name
content_type = caption_file.mime_type
# Create and populate new SupplementalFile record using original metadata
supplemental_file = SupplementalFile.new(label: filename, tags: ['caption'], language: 'eng')
supplemental_file = SupplementalFile.new(label: filename, tags: ['caption'], language: Settings.caption_default.language)
supplemental_file.file.attach(io: ActiveFedora::FileIO.new(caption_file), filename: filename, content_type: content_type, identify: false)
# Skip validation so that incorrect mimetypes do not bomb the entire task
supplemental_file.save(validate: false)
Expand Down

0 comments on commit 68f955d

Please sign in to comment.