diff --git a/db/migrate/20231101200026_add_default_to_distributed_press_publisher.rb b/db/migrate/20231101200026_add_default_to_distributed_press_publisher.rb index ada9392f..fd833acb 100644 --- a/db/migrate/20231101200026_add_default_to_distributed_press_publisher.rb +++ b/db/migrate/20231101200026_add_default_to_distributed_press_publisher.rb @@ -5,7 +5,7 @@ class AddDefaultToDistributedPressPublisher < ActiveRecord::Migration[6.1] def up add_column :distributed_press_publishers, :default, :boolean, default: false - DistributedPressPublisher.last.update(default: true) + DistributedPressPublisher.last&.update(default: true) end def down