From 4a8e3324af95634c2202494c3f7fd60c4aff1408 Mon Sep 17 00:00:00 2001 From: yystopf Date: Fri, 10 Feb 2023 15:39:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index 310d3009e..d258fb0d8 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -429,7 +429,7 @@ class Project < ApplicationRecord last_issue = self.issues.last deleted_issue_count = ($redis_cache.hget("issue_cache_delete_count", self.id) || 0).to_i - last_issue.project_issues_index.present? ? last_issue.project_issues_index + deleted_issue_count : 1 + last_issue&.project_issues_index.present? ? last_issue.project_issues_index + deleted_issue_count : 1 end def incre_project_issue_cache_delete_count