From 2cc7f3a30bcb0317eabd7cf0e6c2b84b72dd3acf Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 29 Aug 2025 15:53:12 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E4=BF=AE=E5=A4=8D=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=AA=E7=A9=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/projects/index.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/organizations/projects/index.json.jbuilder b/app/views/organizations/projects/index.json.jbuilder index 302bc72bf..74232799c 100644 --- a/app/views/organizations/projects/index.json.jbuilder +++ b/app/views/organizations/projects/index.json.jbuilder @@ -10,7 +10,7 @@ json.projects @projects.each do |project| json.image_url url_to_avatar(creator).blank?? User::Avatar.get_letter_avatar_url(creator.login) : url_to_avatar(creator) end json.created_at project.created_on - json.size replace_bytes_to_b(number_to_human_size(gitea_result['size'].to_i*1024)) + json.size gitea_result.present? ? replace_bytes_to_b(number_to_human_size(gitea_result['size'].to_i*1024)) : 0 json.mirror_url project.repository&.mirror_url json.type project.numerical_for_project_type json.praised project.praised_by?(current_user)