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.
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.