Browse Source

提交代码。

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

+ 2
- 1
routers/repo/ai_model_manage.go View File

@@ -214,6 +214,7 @@ func DownloadSingleModelFile(ctx *context.Context) {

func ShowSingleModel(ctx *context.Context) {
id := ctx.Params(":ID")
parentDir := ctx.Query("parentDir")
log.Info("Show single ModelInfo start.id=" + id)
task, err := models.QueryModelById(id)
if err != nil {
@@ -222,7 +223,7 @@ func ShowSingleModel(ctx *context.Context) {
return
}
log.Info("bucket=" + setting.Bucket + " key=" + task.Path[len(setting.Bucket)+1:])
models, err := storage.GetObsListObjectByBucketAndPrefix(setting.Bucket, task.Path[len(setting.Bucket)+1:])
models, err := storage.GetObsListObjectByBucketAndPrefix(setting.Bucket, task.Path[len(setting.Bucket)+1:], parentDir)
if err != nil {
log.Info("get model list failed:", err)
ctx.ServerError("GetObsListObject:", err)


Loading…
Cancel
Save