don't fail if gif is missing

This commit is contained in:
j 2025-03-27 08:59:20 +00:00
parent f61d1e0d45
commit 672bad887c

View file

@ -200,7 +200,7 @@ class Content(models.Model):
if self.photo and self.photo.image.url.endswith('.gif'):
video_path = self.photo.image.path.replace('.gif', '.mp4')
image_path = self.photo.image.path.replace('.gif', '.jpg')
if not os.path.exists(video_path):
if os.path.exists(self.photo.image.path) and not os.path.exists(video_path):
height = self.photo.image.height
if height % 2:
height += 1