changeset 77:fc2bc34e6d89

Don't loop if twitter0 is not configured
author nanaya <me@myconan.net>
date Sun, 26 Jun 2016 16:49:15 +0900
parents 0c023d35cd80
children 924b3a4ed3ef
files app/models/tweet.rb
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/models/tweet.rb	Sun Jun 26 16:46:02 2016 +0900
+++ b/app/models/tweet.rb	Sun Jun 26 16:49:15 2016 +0900
@@ -34,7 +34,7 @@
     @client_config_id = config_id
     config_hash_key = "twitter#{config_id}".to_sym
 
-    return init_client(0) if $cfg[config_hash_key].nil?
+    return init_client(0) if $cfg[config_hash_key].nil? && config_id != 0
 
     @client = Twitter::REST::Client.new do |config|
       $cfg[config_hash_key].each do |cfg_key, cfg_value|