From 6156f85c8c00d3334f76d4ce6911d43202b8282b Mon Sep 17 00:00:00 2001 From: derneuere Date: Thu, 13 Apr 2023 09:16:10 +0200 Subject: [PATCH] Check if fstop is a number before saving --- api/models/photo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/models/photo.py b/api/models/photo.py index f24798ac66..cd6fb1dbd4 100644 --- a/api/models/photo.py +++ b/api/models/photo.py @@ -531,7 +531,8 @@ def _extract_exif_data(self, commit=True): try_sidecar=True, ) self.size = size - self.fstop = fstop + if fstop and isinstance(fstop, numbers.Number): + self.fstop = fstop self.focal_length = focal_length self.iso = iso if shutter_speed and isinstance(shutter_speed, numbers.Number):