From d566153017da758d234dea216669627b566e95c0 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 12 Nov 2021 15:11:58 +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 --- models/ai_model_manage.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/ai_model_manage.go b/models/ai_model_manage.go index a210124a4..a982e565a 100644 --- a/models/ai_model_manage.go +++ b/models/ai_model_manage.go @@ -118,9 +118,8 @@ func ModifyModelNewProperty(id string, new int, versioncount int) error { } func ModifyModelDownloadCount(id string) error { - var sess *xorm.Session + sess := x.NewSession() defer sess.Close() - if _, err := sess.Exec("UPDATE `ai_model_manage` SET download_count = download_count + 1 WHERE id = ?", id); err != nil { return err }