cinsiyet eklenior
This commit is contained in:
parent
fd072f42cc
commit
8339ee5c3b
|
|
@ -30,7 +30,7 @@ func FindOrCreateBrand(db *gorm.DB, brand string, categories []Category) (Brand,
|
|||
err := db.Model(Brand{Name: brand, Code: code}).First(&brandObject).Error
|
||||
|
||||
if err != nil {
|
||||
err := db.Omit("Categories").FirstOrCreate(&brandObject, Brand{Name: brand, Code: code, Categories: categories}).Error
|
||||
err := db.Omit("Categories.*").FirstOrCreate(&brandObject, Brand{Name: brand, Code: code, Categories: categories}).Error
|
||||
log.Println("ERR0000000000000001" + err.Error())
|
||||
return brandObject, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue