Browse Source

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

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

4
apps/orgs/caches.py

@ -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():

Loading…
Cancel
Save