贡献者容错处理

This commit is contained in:
xxq250 2023-04-26 16:17:58 +08:00
parent c4ae40ee52
commit 6b716855a9
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"] || contributor["login"]}-#{contributor["email"]}")
if user.blank?
json.contributions contributor["commits"] || contributor["contributions"]
json.login (contributor["name"] || contributor["login"]).to_s.downcase
json.login nil
json.type nil
json.name (contributor["name"] || contributor["login"]).to_s.downcase
json.email contributor["email"]
@ -10,7 +10,7 @@ if user.blank?
else
json.contributions contributor["commits"] || contributor["contributions"]
json.id user["id"]
json.login (user["login"] || contributor["name"] || contributor["login"]).to_s.downcase
json.login user["login"]
json.email user["email"]
json.type user["type"]
json.name (user["name"] || contributor["name"] || contributor["login"]).to_s.downcase