From 50859bb430ade4b6d2fd21e4b3e28abdc88be8fc Mon Sep 17 00:00:00 2001 From: curo1305 Date: Mon, 1 Jun 2026 14:25:06 +0200 Subject: [PATCH] fix(06.2): CR-02 add MinIOBackend guard in download_daily_export before accessing _client --- backend/api/audit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/api/audit.py b/backend/api/audit.py index 040b163..a2aced8 100644 --- a/backend/api/audit.py +++ b/backend/api/audit.py @@ -217,6 +217,8 @@ async def download_daily_export( raise HTTPException(status_code=404, detail="Invalid date format") backend = get_storage_backend() + if not isinstance(backend, MinIOBackend): + raise HTTPException(status_code=404, detail="Export not found") key = f"audit-logs/{date}.csv" def _get() -> bytes: