Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 4 years ago
parent
commit
d566153017
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      models/ai_model_manage.go

+ 1
- 2
models/ai_model_manage.go View File

@@ -118,9 +118,8 @@ func ModifyModelNewProperty(id string, new int, versioncount int) error {
} }


func ModifyModelDownloadCount(id string) error { func ModifyModelDownloadCount(id string) error {
var sess *xorm.Session
sess := x.NewSession()
defer sess.Close() defer sess.Close()

if _, err := sess.Exec("UPDATE `ai_model_manage` SET download_count = download_count + 1 WHERE id = ?", id); err != nil { if _, err := sess.Exec("UPDATE `ai_model_manage` SET download_count = download_count + 1 WHERE id = ?", id); err != nil {
return err return err
} }


Loading…
Cancel
Save