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:
5
.changeset/fresh-windows-lay.md
Normal file
5
.changeset/fresh-windows-lay.md
Normal file
@@ -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,
|
||||
categories: values.categories.map((id) => ({ id })),
|
||||
type_id: values.type_id || undefined,
|
||||
handle: values.handle || undefined,
|
||||
handle: values.handle?.trim(),
|
||||
origin_country: values.origin_country || undefined,
|
||||
material: values.material || undefined,
|
||||
mid_code: values.mid_code || undefined,
|
||||
hs_code: values.hs_code || undefined,
|
||||
thumbnail,
|
||||
title: values.title,
|
||||
subtitle: values.subtitle || undefined,
|
||||
description: values.description || undefined,
|
||||
title: values.title.trim(),
|
||||
subtitle: values.subtitle?.trim(),
|
||||
description: values.description?.trim(),
|
||||
discountable: values.discountable || undefined,
|
||||
width: values.width ? parseFloat(values.width) : undefined,
|
||||
length: values.length ? parseFloat(values.length) : undefined,
|
||||
|
||||
Reference in New Issue
Block a user