This commit is contained in:
merdan 2022-09-25 22:03:30 +05:00
parent 883cc13e8b
commit 2664fd7275
1 changed files with 3 additions and 1 deletions

View File

@ -254,11 +254,13 @@ func ImportProduct(product models.Product, db *gorm.DB) error {
famAndSellerWG.Wait() //wait until attribute families and sellers are not get from mysql
//BEGIN TRANSACTION
return nil
tx := *db.Begin()
categories, keywords, errCat := getCats(&tx, product.Categories)
return tx.Rollback().Error
if errCat != nil {
log.Println("ERR0 Categories" + errCat.Error())
tx.Rollback()