Fix zip_photos attempting to add deleted files.

This commit is contained in:
voussoir 2020-08-30 18:48:08 -07:00
parent c8ab3c22c9
commit e774b5f101

View file

@ -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)