From 849d564d72fa9f1beb9ba72241ec21a5b8793a3b Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 7 Dec 2021 08:44:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 76702a8b2..574cdbc5a 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -472,7 +472,7 @@ func ModifyModel(id string, description string) error { } func ModifyModelInfo(ctx *context.Context) { - log.Info("delete model start.") + log.Info("modify model start.") id := ctx.Query("ID") description := ctx.Query("Description") @@ -489,10 +489,11 @@ func ModifyModelInfo(ctx *context.Context) { err = ModifyModel(id, description) - if err == nil { - ctx.HTML(200, "success") + if err != nil { + log.Info("modify error," + err.Error()) + ctx.ServerError("error.", err) } else { - ctx.HTML(500, "Failed.") + ctx.JSON(200, "success") } }