Skip to content

Commit

Permalink
chore: remove update from specific product
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgnreis authored May 10, 2024
1 parent f6c27fc commit e2e4f2d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions functions/lib/integration/import-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ module.exports = ({ appSdk, storeId, auth }, blingToken, blingStore, blingDeposi
resolve(queueEntry.blingStockUpdate)
return
}
if (storeId == 51292) {
if (sku === '0002') {
return
} else if (sku === '0003') {
return
} else if (sku === '0004') {
return
}
}

firestore().collection('bling_stock_updates')
.where('ref', '==', `${storeId}_${blingToken}_${sku}`)
Expand Down Expand Up @@ -166,6 +157,10 @@ module.exports = ({ appSdk, storeId, auth }, blingToken, blingStore, blingDeposi
}
let quantity = Number(blingProduct.estoqueAtual)
if (product && (isStockOnly === true || !appData.update_product || variationId)) {
if (storeId == 51292 && product._id === '636eac9a73321213f8d6f75a') {
console.log('break quantity', variationId)
return
}
if (!isNaN(quantity)) {
if (quantity < 0) {
quantity = 0
Expand Down

0 comments on commit e2e4f2d

Please sign in to comment.