From 3964dd2c892210180f43cc3f155095970b50d337 Mon Sep 17 00:00:00 2001 From: Admin MPCZ Date: Sat, 11 Apr 2026 21:04:47 +0200 Subject: [PATCH] Fix: page qualys/agents - try/except sur get_activation_keys et get_agents_summary --- app/routers/qualys.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/routers/qualys.py b/app/routers/qualys.py index 6a84461..1e9a5ab 100644 --- a/app/routers/qualys.py +++ b/app/routers/qualys.py @@ -474,8 +474,14 @@ async def qualys_agents_page(request: Request, db=Depends(get_db)): if not can_view(perms, "qualys"): return RedirectResponse(url="/dashboard") - keys = get_activation_keys(db) - summary = get_agents_summary(db) + try: + keys = get_activation_keys(db) + except Exception: + keys = [] + try: + summary = get_agents_summary(db) + except Exception: + summary = {"statuses": [], "versions": [], "total_assets": 0, "active": 0, "inactive": 0} # Serveurs en prod sans agent Qualys no_agent = db.execute(text("""