From e63a93fbd4a2c8f8efefb90216a58fe618b605f0 Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Thu, 20 Feb 2025 16:13:39 -0600 Subject: [PATCH] fix: use correct path for CSV export filename --- app/routers/files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routers/files.py b/app/routers/files.py index 4cef26f..2f8b556 100644 --- a/app/routers/files.py +++ b/app/routers/files.py @@ -144,12 +144,12 @@ async def analyze_documents(bucket_name: str, requestBody: ExportRequestBody, se if requestBody.csv_filter == "full_table": csv_file_data = service.get_file(bucket_name, objectPathPrefix + requestBody.jobId + ".csv") if csv_file_data is None: - filename = objectPathPrefix + requestBody.jobId + ".csv" + filename = objectPathPrefix + requestBody.jobId + "-results.csv" raise HTTPException(status_code=404, detail=f"File {filename} not found") new_zip.writestr(requestBody.jobId + ".csv", csv_file_data) files_count += 1 elif requestBody.csv_filter == "current_view": - csv_file_data = service.get_file(bucket_name, objectPathPrefix + requestBody.jobId + ".csv") + csv_file_data = service.get_file(bucket_name, objectPathPrefix + requestBody.jobId + "-results.csv") if csv_file_data is None: filename = objectPathPrefix + requestBody.jobId + ".csv" raise HTTPException(status_code=404, detail=f"File {filename} not found")