Follow up - ff6b4256e1
- Fixes #2826: Call of private method #blank? on Twitter client instance blocks migration.
This commit is contained in:
parent
2317537f0e
commit
5ee0d0b31f
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ class Issue2460FixCorruptedTwitterIds < ActiveRecord::Migration[5.2]
|
|||
|
||||
Channel.where(area: 'Twitter::Account').each do |channel|
|
||||
|
||||
client = nil
|
||||
begin
|
||||
client = Twitter::REST::Client.new do |config|
|
||||
config.consumer_key = channel.options['auth']['consumer_key']
|
||||
|
@ -15,7 +16,7 @@ class Issue2460FixCorruptedTwitterIds < ActiveRecord::Migration[5.2]
|
|||
Rails.logger.error "Error while trying to update corrupted Twitter User ID: #{e.message}"
|
||||
end
|
||||
|
||||
next if client.blank?
|
||||
next if client.nil?
|
||||
|
||||
channel.options['user']['id'] = client.user.id.to_s
|
||||
|
||||
|
|
Loading…
Reference in a new issue