diff --git a/app/services/cache/v2/platform_statistic_service.rb b/app/services/cache/v2/platform_statistic_service.rb index a7d9437a0..5de758513 100644 --- a/app/services/cache/v2/platform_statistic_service.rb +++ b/app/services/cache/v2/platform_statistic_service.rb @@ -212,7 +212,7 @@ class Cache::V2::PlatformStatisticService < ApplicationService end def reset_platform_max_issue_count - max_issue = Issue.issue_issue.group(:project_id).count.sort_by{|i|i[1]}.last || [] + max_issue = Issue.where.not(project_id: 0).issue_issue.group(:project_id).count.sort_by{|i|i[1]}.last || [] $redis_cache.hset(platform_statistic_key, max_issue_count_key, max_issue[1].nil? ? 0 : max_issue[1]) end