Skip to content

Commit

Permalink
Prevent checking keys that are folders
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Aug 12, 2024
1 parent 987fea6 commit 3c20d8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readux_ingest_ecds/services/file_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def s3_copy(source, pid):
source_bucket = s3.Bucket(source)

keys_to_copy = [
str(obj.key) for obj in source_bucket.objects.all() if pid in obj.key
str(obj.key)
for obj in source_bucket.objects.all()
if pid in obj.key and not str(obj.key).endswith("/")
]

images = []
Expand Down

0 comments on commit 3c20d8b

Please sign in to comment.