categories update3
This commit is contained in:
parent
a6631c6067
commit
5e8ec82e44
|
|
@ -509,9 +509,9 @@ func (importer *Importer) updateVariant(product models.Product) (*gm.Product, er
|
||||||
var flat gm.ProductFlat
|
var flat gm.ProductFlat
|
||||||
err := importer.baza.Preload("Product").Preload("Variants").First(&flat, "sku = ?", product.ProductNumber).Error
|
err := importer.baza.Preload("Product").Preload("Variants").First(&flat, "sku = ?", product.ProductNumber).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if errors.Is(err,gorm.ErrRecordNotFound) {
|
//if errors.Is(err,gorm.ErrRecordNotFound) {
|
||||||
return importer.importVariant(product)
|
// return importer.importVariant(product)
|
||||||
}
|
//}
|
||||||
//todo not found bolsa create etmeli
|
//todo not found bolsa create etmeli
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue