Skip to content

Commit

Permalink
Fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
luciajanikova committed Sep 20, 2023
1 parent ee0f97d commit 1dc2249
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1dc2249

Please sign in to comment.