fix(dashboard): manage inventory flags (#9487)

**What**
- allow to create a variant without managed inventory (we need to explicitly pass `false` now since the default on the model is `true` for `manage_inventory`)

---

FIXES CC-575
This commit is contained in:
Frane Polić authored and GitHub committed 2024-10-07 17:50:32 +00:00
1 parent 8fbef8a667
commit 57177133e2
1 file changed
+2 -2
@@ -57,8 +57,8 @@ export const normalizeVariants = (
variant.custom_title || Object.values(variant.options || {}).join(" / "), variant.custom_title || Object.values(variant.options || {}).join(" / "),
options: variant.options, options: variant.options,
sku: variant.sku || undefined, sku: variant.sku || undefined,
manage_inventory: variant.manage_inventory || undefined, manage_inventory: !!variant.manage_inventory,
allow_backorder: variant.allow_backorder || undefined, allow_backorder: !!variant.allow_backorder,
inventory_items: variant inventory_items: variant
.inventory!.map((i) => { .inventory!.map((i) => {
const quantity = castNumber(i.required_quantity) const quantity = castNumber(i.required_quantity)