From 1dc22495b38d57a72b386047a23b303d5ecce49f Mon Sep 17 00:00:00 2001 From: luciajanikova <19lucia99@gmail.com> Date: Wed, 20 Sep 2023 09:39:58 +0200 Subject: [PATCH] Fix migration --- .../20230919111034_update_replyable_attributes_on_messages.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20230919111034_update_replyable_attributes_on_messages.rb b/db/migrate/20230919111034_update_replyable_attributes_on_messages.rb index 5ce2b618e..179a4987e 100644 --- a/db/migrate/20230919111034_update_replyable_attributes_on_messages.rb +++ b/db/migrate/20230919111034_update_replyable_attributes_on_messages.rb @@ -2,7 +2,7 @@ class UpdateReplyableAttributesOnMessages < ActiveRecord::Migration[7.0] def change Message.find_each do |message| govbox_message = Govbox::Message.find_by(message_id: message.uuid) - message.update(replyable: govbox_message.replyable?) + message.update(replyable: govbox_message&.replyable? || false) end end end