Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
d316f8b011
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      routers/repo/ai_model_convert.go

+ 10
- 2
routers/repo/ai_model_convert.go View File

@@ -386,11 +386,19 @@ func ShowModelConvertInfo(ctx *context.Context) {
ctx.Data["ModelManageAccess"] = ctx.Repo.CanWrite(models.UnitTypeModelManage)

job, err := models.QueryModelConvertById(ctx.Query("ID"))
ctx.Data["canDownload"] = isOper(ctx, job.UserId)

if err == nil {
ctx.Data["task"] = job
} else {
ctx.ServerError("Not found task.", err)
return
}
ctx.Data["canDownload"] = isOper(ctx, job.UserId)
user, err := models.GetUserByID(job.UserId)
if err == nil {
job.UserName = user.Name
job.UserRelAvatarLink = user.RelAvatarLink()
}

if isCloudBrainTask(job) {
ctx.Data["npu_display"] = "none"
ctx.Data["gpu_display"] = "block"


Loading…
Cancel
Save