Skip to content

Commit

Permalink
Check if fstop is a number before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed Apr 13, 2023
1 parent b632864 commit 6156f85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/models/photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6156f85

Please sign in to comment.