From 672bad887c3953f43b7fb1667e6f014f3bd3f1a0 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 27 Mar 2025 08:59:20 +0000 Subject: [PATCH] don't fail if gif is missing --- content/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/models.py b/content/models.py index bbcf6e2..77a3133 100644 --- a/content/models.py +++ b/content/models.py @@ -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