seller id deadlock and delete elapsed time
This commit is contained in:
parent
42253f230f
commit
e1e0756b40
|
|
@ -597,7 +597,7 @@ func ImportProduct(product models.Product, db *gorm.DB) error {
|
|||
|
||||
flatVariant.ProductID = sizeVariantProduct.ID
|
||||
|
||||
if errVariant := db.Create(&flatVariant).Error; errVariant != nil {
|
||||
if errVariant := tx.Create(&flatVariant).Error; errVariant != nil {
|
||||
log.Println(errVariant)
|
||||
tx.RollbackTo(sizeSavePoint)
|
||||
continue
|
||||
|
|
@ -851,7 +851,7 @@ func UpdateProduct(product models.Product, db *gorm.DB, productFlat gm.ProductFl
|
|||
} else if len(product.ColorVariants) > 0 {
|
||||
//todo update configurable product
|
||||
product.ColorVariants = append(product.ColorVariants, product)
|
||||
|
||||
//tx := db.Begin()
|
||||
for _, colorVariant := range product.ColorVariants {
|
||||
|
||||
if len(colorVariant.SizeVariants) > 0 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue