Allow saving product without image

This commit is contained in:
Gabriel Augendre 2022-04-25 23:11:43 +02:00
parent 5ac1893e31
commit bc80ca060b

View file

@ -82,6 +82,8 @@ class Product(Model):
def save(self, *args, **kwargs):
super().save()
if not self.image:
return
with Image.open(self.image.path) as img:
img = ImageOps.exif_transpose(img)