修复模型更新问题

This commit is contained in:
junleea 2025-03-21 19:20:20 +08:00
parent 4ca7f69253
commit 8a6949c5fd
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ func DeleteModelByID(id int) error {
// 根据id更新模型
func UpdateModelByID(id int, userID uint, modelType, url, parameter, description string) error {
model := Model{UserID: userID, Type: modelType, Url: url, Parameter: parameter}
model := Model{UserID: userID, Type: modelType, Url: url, Parameter: parameter, Description: description}
var res *gorm.DB
if proto.Config.SERVER_SQL_LOG {
res = DB.Debug().Model(&Model{}).Where("id = ?", id).Updates(&model)