fix(dashboard): trim some product create inputs to prevent creation error (#12004)
* fix: trim some inputs to prevent creation error * chore: changeset
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/dashboard": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(dashboard): product create trim inputs
|
||||||
@@ -27,15 +27,15 @@ export const normalizeProductFormValues = (
|
|||||||
shipping_profile_id: values.shipping_profile_id || undefined,
|
shipping_profile_id: values.shipping_profile_id || undefined,
|
||||||
categories: values.categories.map((id) => ({ id })),
|
categories: values.categories.map((id) => ({ id })),
|
||||||
type_id: values.type_id || undefined,
|
type_id: values.type_id || undefined,
|
||||||
handle: values.handle || undefined,
|
handle: values.handle?.trim(),
|
||||||
origin_country: values.origin_country || undefined,
|
origin_country: values.origin_country || undefined,
|
||||||
material: values.material || undefined,
|
material: values.material || undefined,
|
||||||
mid_code: values.mid_code || undefined,
|
mid_code: values.mid_code || undefined,
|
||||||
hs_code: values.hs_code || undefined,
|
hs_code: values.hs_code || undefined,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
title: values.title,
|
title: values.title.trim(),
|
||||||
subtitle: values.subtitle || undefined,
|
subtitle: values.subtitle?.trim(),
|
||||||
description: values.description || undefined,
|
description: values.description?.trim(),
|
||||||
discountable: values.discountable || undefined,
|
discountable: values.discountable || undefined,
|
||||||
width: values.width ? parseFloat(values.width) : undefined,
|
width: values.width ? parseFloat(values.width) : undefined,
|
||||||
length: values.length ? parseFloat(values.length) : undefined,
|
length: values.length ? parseFloat(values.length) : undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user