fix(repository): Change Save to Updates in Update method for better handling of menu updates
This commit is contained in:
parent
8fe0448aa8
commit
2020a906fc
|
|
@ -86,7 +86,7 @@ func (m *menuRepository) Update(ctx context.Context, tx *gorm.DB, menu entities.
|
|||
tx = m.db
|
||||
}
|
||||
|
||||
if err := tx.WithContext(ctx).Save(&menu).Error; err != nil {
|
||||
if err := tx.WithContext(ctx).Updates(&menu).Error; err != nil {
|
||||
return entities.M_Menu{}, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue