improvements to coop loader
This commit is contained in:
@@ -86,7 +86,7 @@ def create_imported_product(info, company, history, user):
|
||||
# save using File object
|
||||
img_io = BytesIO()
|
||||
image.save(img_io, format=image.format)
|
||||
new.image.save(f"{new.name}-{new.sku}.jpg", File(img_io), save=False)
|
||||
new.image.save(f"{new.name}-{new.sku}.{image.format.lower()}", File(img_io), save=False)
|
||||
new.save()
|
||||
except AssertionError as e:
|
||||
logging.error(f"Source image [{info['images'][0]['src']}] not reachable: {response.status_code}")
|
||||
|
||||
Reference in New Issue
Block a user