From c05ec932db315c54ce3d6e025795f8585b4002e7 Mon Sep 17 00:00:00 2001 From: Khalid MOUTAOUAKIL Date: Mon, 6 Apr 2026 23:25:36 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20histogramme=20patching:=20exclure=20annul?= =?UTF-8?q?=C3=A9s/report=C3=A9s=20du=20graphe=20semaines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- app/routers/audit_full.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/routers/audit_full.py b/app/routers/audit_full.py index ba232b8..17eed82 100644 --- a/app/routers/audit_full.py +++ b/app/routers/audit_full.py @@ -290,6 +290,7 @@ async def audit_full_patching(request: Request, db=Depends(get_db)): patch_weekly = db.execute(text( "SELECT last_patch_week as week, COUNT(*) as cnt FROM server_audit_full" " WHERE status IN ('ok','partial') AND last_patch_year = 2026 AND last_patch_week IS NOT NULL" + " AND (patch_status_2026 = 'patched' OR patch_status_2026 IS NULL)" " AND id IN (SELECT DISTINCT ON (hostname) id FROM server_audit_full WHERE status IN ('ok','partial') ORDER BY hostname, audit_date DESC)" " GROUP BY last_patch_week ORDER BY last_patch_week" )).fetchall()