fix(06.2): CR-02 add MinIOBackend guard in download_daily_export before accessing _client
This commit is contained in:
@@ -217,6 +217,8 @@ async def download_daily_export(
|
|||||||
raise HTTPException(status_code=404, detail="Invalid date format")
|
raise HTTPException(status_code=404, detail="Invalid date format")
|
||||||
|
|
||||||
backend = get_storage_backend()
|
backend = get_storage_backend()
|
||||||
|
if not isinstance(backend, MinIOBackend):
|
||||||
|
raise HTTPException(status_code=404, detail="Export not found")
|
||||||
key = f"audit-logs/{date}.csv"
|
key = f"audit-logs/{date}.csv"
|
||||||
|
|
||||||
def _get() -> bytes:
|
def _get() -> bytes:
|
||||||
|
|||||||
Reference in New Issue
Block a user