medusa
medusa copied to clipboard
Inconsistent behaviour between product import and admin UI
If a new product violates the unique index of the product handle the database error is displayed
Environment
medusa -v
Medusa CLI version: 1.3.22
Medusa version: 1.20.0
node -v
v20.11.0
postgres=# SELECT version();
version
------------------
PostgreSQL 15.4
Steps to reproduce the behavior
-
create a simple product with no custom title for the variant
- Product can be saved
-
import via CSV a product that has empty string
""
for the Variant Title column
Product Id;Product Handle;Product Title;Variant Title;Variant Inventory Quantity
;no-variant-title;No Variant Title;"";0
- error is thrown
Error while processing row with [(product id: null), (product handle: no-variant-title), (variant id: undefined), (variant sku: undefined)]: null value in column "title" of relation "product_variant" violates not-null constraint
- see #6192
Expected Behaviour
An empty string is not considered null
I'm having the same issue, did you manage to solve it?