fix: /health/ready dict handling

This commit is contained in:
Agent Zero
2026-07-29 23:23:52 +02:00
parent 3e9cfbef8a
commit 32db1498ba
+3 -1
View File
@@ -52,7 +52,9 @@ async def health_ready() -> ReadyResponse:
checks = {}
all_ready = True
for check_name, check_val in (health.checks or {}).items():
# health is a dict (or HealthResponse), handle both
health_checks = health.get('checks', {}) if isinstance(health, dict) else (health.checks or {})
for check_name, check_val in health_checks.items():
status = "ok" if check_val == "ok" or check_val is True else "fail"
checks[check_name] = status
if status != "ok":