|
|
|
@@ -1182,6 +1182,7 @@ func ModifyModelInfo(ctx *context.Context) { |
|
|
|
label := ctx.Query("label") |
|
|
|
description := ctx.Query("description") |
|
|
|
engine := ctx.QueryInt("engine") |
|
|
|
isPrivate := ctx.QueryBool("isPrivate") |
|
|
|
aimodels := models.QueryModelByName(name, task.RepoId) |
|
|
|
if aimodels != nil && len(aimodels) > 0 { |
|
|
|
if len(aimodels) == 1 { |
|
|
|
@@ -1196,14 +1197,14 @@ func ModifyModelInfo(ctx *context.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
err = models.ModifyLocalModel(id, name, label, description, engine) |
|
|
|
err = models.ModifyLocalModel(id, name, label, description, engine, isPrivate) |
|
|
|
|
|
|
|
} else { |
|
|
|
label := ctx.Query("label") |
|
|
|
description := ctx.Query("description") |
|
|
|
engine := task.Engine |
|
|
|
name := task.Name |
|
|
|
err = models.ModifyLocalModel(id, name, label, description, int(engine)) |
|
|
|
err = models.ModifyLocalModel(id, name, label, description, int(engine), task.IsPrivate) |
|
|
|
} |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|