Skip to content

Commit

Permalink
Adds feedback to successful save
Browse files Browse the repository at this point in the history
  • Loading branch information
afred committed Sep 3, 2024
1 parent 2570dff commit f54febc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/hotfixes/001_change_media_type/hotfix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ def run!
next
end

# Change the metadata
pi.media_type = 'Moving Image'
pi.save

begin
pi.save
puts "PhysicalInstantiationResource #{pi.id} saved with media_type 'Moving Image'"
rescue => e
puts "Error saving PhysicalInstantiationResource #{pi.id}: #{e.class} -- #{e.message}"
end
end
end
end
Expand Down

0 comments on commit f54febc

Please sign in to comment.