允许修改标签

This commit is contained in:
2023-06-20 02:45:32 +08:00
parent e8450a8775
commit c5d453b034

View File

@@ -292,6 +292,9 @@ func ModelItemPatch(w http.ResponseWriter, r *http.Request) {
if model_new.Progress != 0 && model_new.Progress != model.Progress {
model.Progress = model_new.Progress
}
if model_new.Tags != nil && len(model_new.Tags) != len(model.Tags) {
model.Tags = model_new.Tags
}
// 執行更新
if err := configs.ORMDB().Save(&model).Error; err != nil {