fix: 修复计算今日活跃资产过滤逻辑 (#9744)

Co-authored-by: Bai <baijiangjie@gmail.com>
pull/9747/head
fit2bot 2023-02-24 12:17:10 +08:00 committed by GitHub
parent e69ba27ff4
commit d6bd207a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -114,9 +114,7 @@ class OrgResourceStatisticsCache(OrgRelatedCache):
@staticmethod
def compute_total_count_today_active_assets():
t = local_zero_hour()
return Session.objects.filter(
date_start__gte=t, is_success=False
).values('asset_id').distinct().count()
return Session.objects.filter(date_start__gte=t).values('asset_id').distinct().count()
@staticmethod
def compute_total_count_today_failed_sessions():