Add missing input value, cast values to number (#1692)
This commit is contained in:
parent
a8c6379d4e
commit
6e9b12b04e
2 changed files with 3 additions and 1 deletions
|
@ -278,7 +278,7 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
|
||||||
id: variantId,
|
id: variantId,
|
||||||
removeStocks: data.removeStocks,
|
removeStocks: data.removeStocks,
|
||||||
sku: data.sku,
|
sku: data.sku,
|
||||||
quantityLimitPerCustomer: data.quantityLimitPerCustomer || null,
|
quantityLimitPerCustomer: Number(data.quantityLimitPerCustomer) || null,
|
||||||
stocks: data.updateStocks.map(mapFormsetStockToStockInput),
|
stocks: data.updateStocks.map(mapFormsetStockToStockInput),
|
||||||
trackInventory: data.trackInventory,
|
trackInventory: data.trackInventory,
|
||||||
preorder: data.isPreorder
|
preorder: data.isPreorder
|
||||||
|
|
|
@ -119,6 +119,8 @@ export const ProductVariant: React.FC<ProductVariantCreateProps> = ({
|
||||||
})),
|
})),
|
||||||
trackInventory: true,
|
trackInventory: true,
|
||||||
weight: weight(formData.weight),
|
weight: weight(formData.weight),
|
||||||
|
quantityLimitPerCustomer:
|
||||||
|
Number(formData.quantityLimitPerCustomer) || null,
|
||||||
preorder: formData.isPreorder
|
preorder: formData.isPreorder
|
||||||
? {
|
? {
|
||||||
globalThreshold: formData.globalThreshold
|
globalThreshold: formData.globalThreshold
|
||||||
|
|
Loading…
Reference in a new issue