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,
|
||||
removeStocks: data.removeStocks,
|
||||
sku: data.sku,
|
||||
quantityLimitPerCustomer: data.quantityLimitPerCustomer || null,
|
||||
quantityLimitPerCustomer: Number(data.quantityLimitPerCustomer) || null,
|
||||
stocks: data.updateStocks.map(mapFormsetStockToStockInput),
|
||||
trackInventory: data.trackInventory,
|
||||
preorder: data.isPreorder
|
||||
|
|
|
@ -119,6 +119,8 @@ export const ProductVariant: React.FC<ProductVariantCreateProps> = ({
|
|||
})),
|
||||
trackInventory: true,
|
||||
weight: weight(formData.weight),
|
||||
quantityLimitPerCustomer:
|
||||
Number(formData.quantityLimitPerCustomer) || null,
|
||||
preorder: formData.isPreorder
|
||||
? {
|
||||
globalThreshold: formData.globalThreshold
|
||||
|
|
Loading…
Reference in a new issue