From 1c111e83b3157f466c350230049b759987a43694 Mon Sep 17 00:00:00 2001 From: "vilet.yy" Date: Thu, 6 May 2021 14:48:44 +0800 Subject: [PATCH] fix: project controbutor nil --- app/views/repositories/detail.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/repositories/detail.json.jbuilder b/app/views/repositories/detail.json.jbuilder index 644a472ab..75b474ee0 100644 --- a/app/views/repositories/detail.json.jbuilder +++ b/app/views/repositories/detail.json.jbuilder @@ -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