glossier / solidus_retail

Solidus Extension to Support Retail Operations
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

Exporting the products multiple time won't invalidate previous exported #47

Closed thisiscab closed 7 years ago

thisiscab commented 7 years ago

data.

The problem was that when you export the first time YOU HAVE to add the variant attributes in order for the product to have the variants at first. But the second time, it says that the variant already exists and thus it doesn't get persisted and the ID returned for those variants are nil. The nil value was getting saved in those variants and was causing problems.

The best solution would be to pass the variant_id if the variant is persisted and I would expect that it would update it instead of trying to create it but that would require more time. I find this is a low-user path. Let' investigate more if need be.

thisiscab commented 7 years ago

Mind to CR this quickly @braidn @bryanmtl @DanielWright ty vm gg no-re

DanielWright commented 7 years ago

Idempotence!