From b0e117b06569c7893efb8c22a1294e8f722a1258 Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 8 Mar 2023 11:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E8=B4=A1=E7=8C=AE?= =?UTF-8?q?=E5=8D=A0=E6=AF=94=E9=9C=80=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=BC=80=E5=90=AF=E7=A1=AE=E6=9D=83=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_contributor.json.jbuilder | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/repositories/_contributor.json.jbuilder b/app/views/repositories/_contributor.json.jbuilder index 2efaa0073..ed8a581a6 100644 --- a/app/views/repositories/_contributor.json.jbuilder +++ b/app/views/repositories/_contributor.json.jbuilder @@ -13,5 +13,8 @@ else json.type user["type"] json.name user["name"] json.image_url user["avatar_url"] - json.blockchain_perc user.contribution_perc(project) + if project.use_blockchain + db_user = User.find_by_id(user["id"]) + json.blockchain_perc db_user.contribution_perc(project) + end end