From 9f9cf9a33ffa57c798ed88d7ef82f1baed1d4757 Mon Sep 17 00:00:00 2001 From: Ebru Yucesar Date: Wed, 4 Sep 2024 11:46:35 -0400 Subject: [PATCH] exclude index.html from zip --- tasks/zip_volumes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/zip_volumes.py b/tasks/zip_volumes.py index 3bb614c..9f83d28 100644 --- a/tasks/zip_volumes.py +++ b/tasks/zip_volumes.py @@ -62,7 +62,8 @@ def get_case_files_of_volume(reporter, volume, file_type, bucket): for page in r2_paginator.paginate(Bucket=bucket, Prefix=prefix, PaginationConfig={"PageSize": 1000}): for item in page["Contents"]: - files_for_volumes.append(item["Key"]) + if "/index.html" not in item["Key"]: + files_for_volumes.append(item["Key"]) return files_for_volumes