贡献者容错处理
This commit is contained in:
parent
c4ae40ee52
commit
6b716855a9
|
@ -1,7 +1,7 @@
|
||||||
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"] || contributor["login"]}-#{contributor["email"]}")
|
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"] || contributor["login"]}-#{contributor["email"]}")
|
||||||
if user.blank?
|
if user.blank?
|
||||||
json.contributions contributor["commits"] || contributor["contributions"]
|
json.contributions contributor["commits"] || contributor["contributions"]
|
||||||
json.login (contributor["name"] || contributor["login"]).to_s.downcase
|
json.login nil
|
||||||
json.type nil
|
json.type nil
|
||||||
json.name (contributor["name"] || contributor["login"]).to_s.downcase
|
json.name (contributor["name"] || contributor["login"]).to_s.downcase
|
||||||
json.email contributor["email"]
|
json.email contributor["email"]
|
||||||
|
@ -10,7 +10,7 @@ if user.blank?
|
||||||
else
|
else
|
||||||
json.contributions contributor["commits"] || contributor["contributions"]
|
json.contributions contributor["commits"] || contributor["contributions"]
|
||||||
json.id user["id"]
|
json.id user["id"]
|
||||||
json.login (user["login"] || contributor["name"] || contributor["login"]).to_s.downcase
|
json.login user["login"]
|
||||||
json.email user["email"]
|
json.email user["email"]
|
||||||
json.type user["type"]
|
json.type user["type"]
|
||||||
json.name (user["name"] || contributor["name"] || contributor["login"]).to_s.downcase
|
json.name (user["name"] || contributor["name"] || contributor["login"]).to_s.downcase
|
||||||
|
|
Loading…
Reference in New Issue