mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-22 08:08:04 +01:00
Allow saving product without image
This commit is contained in:
parent
5ac1893e31
commit
bc80ca060b
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue