Skip to content

Commit

Permalink
TenantS
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvey-Kuk committed Nov 20, 2024
1 parent 7f293ca commit cb65b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keep/api/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cb65b37

Please sign in to comment.