From c891fcf83680047853c5ac89ba0d357ec31f2dc9 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 23 Mar 2023 12:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9Aforks=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 24bc937de..1d98b17f4 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -24,9 +24,9 @@ class RepositoriesController < ApplicationController @result = Repositories::DetailService.call(@owner, @repository, @user) cache_total_forks = $redis_cache.get("ProjectSpecialForks:#{@project.id}") if cache_total_forks.present? - @project_forked_count = @project.forked_count.to_i - else @project_forked_count = cache_total_forks.to_i + else + @project_forked_count = @project.forked_count.to_i end @project_fork_id = @project.try(:forked_from_project_id) if @project_fork_id.present?