diff --git a/backend/services/inventoryReservationService.js b/backend/services/inventoryReservationService.js index 5a4fda5a..3e51ad17 100644 --- a/backend/services/inventoryReservationService.js +++ b/backend/services/inventoryReservationService.js @@ -111,6 +111,9 @@ async function reserveStockInTransaction(conn, userId, productId, quantity, now, if (variant) { totalStock = safeNumber(variant.stock); + if(line.variantId <= NO_VARIANT_ID){ + line.variantId = variant.id; + } } const [locks] = variant