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

Co-authored-by: Bai <baijiangjie@gmail.com>
pull/9746/head
fit2bot 2 years ago committed by GitHub
parent 1b2de703f4
commit a4a871ff2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save