dannop commited on
Commit
37797fc
1 Parent(s): a169ad2

Update app.py

Browse files

Ajustando chave vazia da S3

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -12,7 +12,9 @@ def check_image_similarity(photo_shoot_id):
12
 
13
  images = []
14
  for file in files:
15
- images.append(AwsService.get_image_from_s3(os.environ.get('AWS_S3_BUCKET'), file['Key']))
 
 
16
 
17
  return ImageSimilarity(1).check(images)
18
 
 
12
 
13
  images = []
14
  for file in files:
15
+ params = file['Key'].split('/')
16
+ if params[-1] != '' and params[-1] != ' ':
17
+ images.append(AwsService.get_image_from_s3(os.environ.get('AWS_S3_BUCKET'), file['Key']))
18
 
19
  return ImageSimilarity(1).check(images)
20