Browse Source

提交代码。

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

+ 5
- 0
routers/repo/ai_model_manage.go View File

@@ -391,6 +391,11 @@ func ShowOneVersionOtherModel(ctx *context.Context) {
repoId := ctx.Repo.Repository.ID
name := ctx.Query("name")
aimodels := models.QueryModelByName(name, repoId)
for _, model := range aimodels {
log.Info("model=" + model.Name)
log.Info("model.UserId=" + fmt.Sprint(model.UserId))
model.IsCanOper = isOper(ctx, model.UserId)
}
if len(aimodels) > 0 {
ctx.JSON(200, aimodels[1:])
} else {


Loading…
Cancel
Save