Spaces:
Sleeping
Sleeping
Fix project status filtering to include 'active' across dashboard and analytics endpoints
Browse files
src/app/api/v1/analytics.py
CHANGED
|
@@ -98,7 +98,7 @@ def get_platform_admin_dashboard_stats(
|
|
| 98 |
# Project Statistics
|
| 99 |
total_projects = db.query(func.count(Project.id)).scalar()
|
| 100 |
active_projects = db.query(func.count(Project.id)).filter(
|
| 101 |
-
Project.status.in_(["planning", "
|
| 102 |
).scalar()
|
| 103 |
|
| 104 |
project_stats = {
|
|
|
|
| 98 |
# Project Statistics
|
| 99 |
total_projects = db.query(func.count(Project.id)).scalar()
|
| 100 |
active_projects = db.query(func.count(Project.id)).filter(
|
| 101 |
+
Project.status.in_(["planning", "active", "on_hold"])
|
| 102 |
).scalar()
|
| 103 |
|
| 104 |
project_stats = {
|
src/app/services/dashboard_service.py
CHANGED
|
@@ -578,7 +578,7 @@ class DashboardService:
|
|
| 578 |
|
| 579 |
# Project stats
|
| 580 |
total_projects = len(projects)
|
| 581 |
-
active_projects = len([p for p in projects if p.status in ["planning", "
|
| 582 |
|
| 583 |
# Team stats (for managers)
|
| 584 |
total_team_members = 0
|
|
|
|
| 578 |
|
| 579 |
# Project stats
|
| 580 |
total_projects = len(projects)
|
| 581 |
+
active_projects = len([p for p in projects if p.status in ["planning", "active", "on_hold"]])
|
| 582 |
|
| 583 |
# Team stats (for managers)
|
| 584 |
total_team_members = 0
|