From cb65b37daf2de088c37360a87a8b7924e33973d5 Mon Sep 17 00:00:00 2001 From: Matvey Kukuy Date: Wed, 20 Nov 2024 19:07:58 +0200 Subject: [PATCH] TenantS --- keep/api/core/db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keep/api/core/db.py b/keep/api/core/db.py index f8ae1d566..f374117ee 100644 --- a/keep/api/core/db.py +++ b/keep/api/core/db.py @@ -4511,10 +4511,10 @@ def get_activity_report( last_24_hours = datetime.utcnow() - timedelta(hours=24) activity_report = {} with Session(engine) as session: - activity_report['tenant_count'] = session.query(Tenant).count() + activity_report['tenants_count'] = session.query(Tenant).count() activity_report['providers_count'] = session.query(Provider).count() activity_report['users_count'] = session.query(User).count() - activity_report['last_24_hours_incident_count'] = session.query(Incident).filter( + activity_report['last_24_hours_incidents_count'] = session.query(Incident).filter( Incident.creation_time >= last_24_hours).count() activity_report['last_24_hours_alerts_count'] = session.query(Alert).filter( Alert.timestamp >= last_24_hours).count()