From 32db1498ba59b1acfae5b40ab221b414ed289d22 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Wed, 29 Jul 2026 23:23:52 +0200 Subject: [PATCH] fix: /health/ready dict handling --- app/routes/health.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/routes/health.py b/app/routes/health.py index 13c7041..bfb9eb3 100644 --- a/app/routes/health.py +++ b/app/routes/health.py @@ -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":