Merge pull request #220 from medusajs/hotfix/contentful-variants

fix: ensures that product variants are updated in contentful when they are part of a product update
This commit is contained in:
Sebastian Rindom
2021-03-26 15:23:09 +01:00
committed by GitHub
@@ -449,10 +449,15 @@ class ContentfulService extends BaseService {
"options", "options",
] ]
// 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
// references are set up correctly so we run through everything.
if (variant.fields) {
const found = variant.fields.find((f) => updateFields.includes(f)) const found = variant.fields.find((f) => updateFields.includes(f))
if (!found) { if (!found) {
return return
} }
}
try { try {
// const ignoreIds = (await this.getIgnoreIds_("product_variant")) || [] // const ignoreIds = (await this.getIgnoreIds_("product_variant")) || []