From 4448285d0596f1b6e51fa67566aaf941c099948d Mon Sep 17 00:00:00 2001 From: Osamu Takiya Date: Sat, 5 Jun 2021 19:48:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E3=82=B9=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=83=83=E3=83=89=E3=82=B7=E3=83=BC=E3=83=88=E3=81=AE?= =?UTF-8?q?=E5=88=9D=E5=9B=9E=E6=9B=B8=E3=81=8D=E8=BE=BC=E3=81=BF=E6=99=82?= =?UTF-8?q?=E3=81=AE=E5=AF=BE=E5=BF=9C=E3=81=8C=E6=BC=8F=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=9F=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3=20(#67)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../google_sheet_api/write_to_response_api_sheet_by_hashtag.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/lib/google_sheet_api/write_to_response_api_sheet_by_hashtag.rb b/app/lib/google_sheet_api/write_to_response_api_sheet_by_hashtag.rb index b32f2e6..f93a2b0 100644 --- a/app/lib/google_sheet_api/write_to_response_api_sheet_by_hashtag.rb +++ b/app/lib/google_sheet_api/write_to_response_api_sheet_by_hashtag.rb @@ -104,6 +104,9 @@ def cast_value_type(already_sheet_all_data_values) end def set_max_tweet_id_number(already_sheet_data) + # 初回実行時の対応 + @max_tweet_id_number = 0 if already_sheet_data.values.count == 1 + tweet_id_numbers = already_sheet_data.values.map do |row| next if row[1] == 'tweetId'