Skip to content

Commit c8ef595

Browse files
committed
fix: do not set inventory on stock import with one deposit only
1 parent f055a76 commit c8ef595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/lib/integration/import-product.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ module.exports = ({ appSdk, storeId, auth }, blingToken, blingStore, blingDeposi
198198
}
199199
console.log(`#${storeId} ${resourceAndId}`, { quantity, inventory, sku })
200200
if (Object.keys(inventory).length) {
201-
if (quantity > 0 && (!inventoryQnt || Object.keys(inventory).length === 1)) {
201+
if ((quantity > 0 && !inventoryQnt) || Object.keys(inventory).length === 1) {
202202
inventory = {}
203203
}
204204
const endpoint = `${resourceAndId}.json`

0 commit comments

Comments
 (0)