diff --git a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js index df7f545a43..95cee6bc2e 100644 --- a/packages/medusa-plugin-brightpearl/src/services/brightpearl.js +++ b/packages/medusa-plugin-brightpearl/src/services/brightpearl.js @@ -138,9 +138,12 @@ class BrightpearlService extends BaseService { ) const onHand = availability[productId].total.onHand - return this.productVariantService_.update(v._id, { - inventory_quantity: onHand, - }) + // Only update if the inventory levels have changed + if (parseInt(v.inventory_quantity) !== parseInt(onHand)) { + return this.productVariantService_.update(v._id, { + inventory_quantity: onHand, + }) + } }) ) }