[168] data_nature_importer: Add image mime type check
This commit is contained in:
parent
4bd2084593
commit
0c62fc4de0
5 changed files with 10 additions and 2 deletions
|
|
@ -43,6 +43,7 @@ Changelog
|
|||
- 16.0.1.1.0: Add Queue Job support and move to server action
|
||||
- 16.0.1.1.1: Use default image as product image
|
||||
- 16.0.1.2.0: Add Extra Product Media support
|
||||
- 16.0.1.2.1: Add image mime type check
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"author": "BAKEUP",
|
||||
"website": "https://www.bakeup.org",
|
||||
"category": "product",
|
||||
"version": "16.0.1.2.0",
|
||||
"version": "16.0.1.2.1",
|
||||
"depends": ["product", "queue_job", "website_sale"],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@ class ProductTemplate(models.Model):
|
|||
image_id = None
|
||||
for image in images:
|
||||
image_id = image.get("id")
|
||||
if image.get("mime_type") not in [
|
||||
"image/jpeg",
|
||||
"image/png",
|
||||
]:
|
||||
continue
|
||||
image_data = dn_utils.get_datanature_image(self, image_id, token=None)
|
||||
if not image_data:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -2,4 +2,5 @@
|
|||
- 16.0.1.0.1: Catch empty metadata response in _get_dn_metadata
|
||||
- 16.0.1.1.0: Add Queue Job support and move to server action
|
||||
- 16.0.1.1.1: Use default image as product image
|
||||
- 16.0.1.2.0: Add Extra Product Media support
|
||||
- 16.0.1.2.0: Add Extra Product Media support
|
||||
- 16.0.1.2.1: Add image mime type check
|
||||
|
|
@ -386,6 +386,7 @@ ul.auto-toc {
|
|||
<li>16.0.1.1.0: Add Queue Job support and move to server action</li>
|
||||
<li>16.0.1.1.1: Use default image as product image</li>
|
||||
<li>16.0.1.2.0: Add Extra Product Media support</li>
|
||||
<li>16.0.1.2.1: Add image mime type check</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
|
|
|
|||
Loading…
Reference in a new issue