From 3f1ffcdb345f598476b93f9c86a0149f4f111a6c Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 17 May 2023 21:31:32 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E6=8F=90=E4=BA=A4=E8=80=85=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E7=94=A8=E6=88=B7email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/repositories_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 570a2330..c73f1834 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -43,6 +43,9 @@ module RepositoriesHelper if author_json["Name"].present? && author_json["Email"].present? user = find_user_in_redis_cache(author_json['Name'], author_json['Email']) end + if user.blank? && author_json["email"].present? + user = User.find_by(mail: author_json["email"]) + end if user.blank? && author_json["Email"].present? user = User.find_by(mail: author_json["Email"]) end