Merge branch 'master' into fix/discount-usage

This commit is contained in:
olivermrbl
2021-04-09 08:39:24 +02:00
@@ -76,7 +76,7 @@ class ContentfulService extends BaseService {
let assets = [] let assets = []
await Promise.all( await Promise.all(
product.images product.images
.filter((image) => image !== product.thumbnail) .filter((image) => image.url !== product.thumbnail)
.map(async (image, i) => { .map(async (image, i) => {
const asset = await environment.createAsset({ const asset = await environment.createAsset({
fields: { fields: {
@@ -89,8 +89,8 @@ class ContentfulService extends BaseService {
file: { file: {
"en-US": { "en-US": {
contentType: "image/xyz", contentType: "image/xyz",
fileName: image, fileName: image.url,
upload: image, upload: image.url,
}, },
}, },
}, },
@@ -450,7 +450,7 @@ class ContentfulService extends BaseService {
] ]
// Update came directly from product variant service so only act on a couple // Update came directly from product variant service so only act on a couple
// of fields. When the update comes from the product we want to ensure // of fields. When the update comes from the product we want to ensure
// references are set up correctly so we run through everything. // references are set up correctly so we run through everything.
if (variant.fields) { if (variant.fields) {
const found = variant.fields.find((f) => updateFields.includes(f)) const found = variant.fields.find((f) => updateFields.includes(f))