From fe294e6fed80da64ab81804e3deaaaee28796fd8 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 19 Apr 2023 20:28:25 +0800 Subject: [PATCH] =?UTF-8?q?commit=E6=8F=90=E5=8F=96=E8=B4=A1=E7=8C=AE?= =?UTF-8?q?=E8=80=85=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/batch_add_contributors.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/batch_add_contributors.rake b/lib/tasks/batch_add_contributors.rake index 633ee869e..806c132c6 100644 --- a/lib/tasks/batch_add_contributors.rake +++ b/lib/tasks/batch_add_contributors.rake @@ -43,7 +43,7 @@ namespace :batch_add_contributors do site = Site.find_by_sql("select id, created_at from commit_contributors where name='#{commiter['email']}'") if site.present? puts "commit_date====#{commit_date},created_at======#{site.first&.created_at}" - if commit_date.to_i < site.created_at.to_i + if commit_date.to_i < site.first&.created_at.to_i sql = "update commit_contributors set created_at ='#{commit_date_str}' where name='#{commiter['email']}'" end else @@ -98,7 +98,7 @@ namespace :batch_add_contributors do if site.present? puts "commit_date====#{commit_date},created_at======#{site.first&.created_at}" - if commit_date.to_i < site.created_at.to_i + if commit_date.to_i < site.first&.created_at.to_i sql = "update commit_contributors set created_at ='#{commit_date_str}' where name='#{commiter['email']}'" end else