Fix test failures and workload/websocket behavior

This commit is contained in:
beabigegg
2026-01-11 08:37:21 +08:00
parent 3bdc6ff1c9
commit f5f870da56
49 changed files with 3006 additions and 1132 deletions

View File

@@ -42,7 +42,9 @@ def _serialize_workload_summary(summary: UserWorkloadSummary) -> dict:
"department_name": summary.department_name,
"capacity_hours": str(summary.capacity_hours),
"allocated_hours": str(summary.allocated_hours),
"load_percentage": str(summary.load_percentage) if summary.load_percentage else None,
"load_percentage": (
str(summary.load_percentage) if summary.load_percentage is not None else None
),
"load_level": summary.load_level.value,
"task_count": summary.task_count,
}