From e774b5f1018435c56c25d98a6ef8b85a9c749646 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 30 Aug 2020 18:48:08 -0700 Subject: [PATCH] Fix zip_photos attempting to add deleted files. --- etiquette/helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etiquette/helpers.py b/etiquette/helpers.py index 7885d7c..8079586 100644 --- a/etiquette/helpers.py +++ b/etiquette/helpers.py @@ -504,6 +504,8 @@ def zip_photos(photos): zipfile = zipstream.ZipFile() for photo in photos: + if not photo.real_path.is_file: + continue arcname = os.path.join('photos', f'{photo.id} - {photo.basename}') zipfile.write(filename=photo.real_path.absolute_path, arcname=arcname)