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":