fix: project controbutor nil

This commit is contained in:
vilet.yy 2021-05-06 14:48:44 +08:00
parent 4643d2387c
commit 1c111e83b3
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ json.contributors do
total_count = @result[:contributor].size
json.list @result[:contributor].each do |contributor|
user = User.find_by(gitea_uid: contributor["id"])
if contributor["login"] == "root"
if contributor["login"] == "root" || user.nil?
total_count -= 1
next
end