Fix zip_photos attempting to add deleted files.
This commit is contained in:
parent
c8ab3c22c9
commit
e774b5f101
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue