ready link import fx 1

This commit is contained in:
merdan 2022-12-08 15:37:10 +05:00
parent 72b63ca6ad
commit e1b9ca428d
1 changed files with 2 additions and 2 deletions

View File

@ -565,7 +565,7 @@ func (importer *Importer) updatePrice(price models.Price, flat *gm.ProductFlat)
func (importer *Importer) UpdateOrCreate(product models.Product) (instance *Importer) {
firstProduct, err := importer.importVariant(product)
newProducts := make([]gm.Product, 0)
var newProducts []gm.Product
if err != nil {
helper.Error(err)
@ -574,7 +574,7 @@ func (importer *Importer) UpdateOrCreate(product models.Product) (instance *Impo
if importer.Error != nil {
return importer
}
} else {
} else if &firstProduct != nil {
newProducts[0] = *firstProduct
}