Browse Source

提交代码,解压bug

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

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

@@ -956,6 +956,7 @@ func ShowOneVersionOtherModel(ctx *context.Context) {
} }


func SetModelCount(ctx *context.Context) { func SetModelCount(ctx *context.Context) {
isQueryPrivate := isQueryPrivateModel(ctx)
repoId := ctx.Repo.Repository.ID repoId := ctx.Repo.Repository.ID
Type := -1 Type := -1
_, count, _ := models.QueryModel(&models.AiModelQueryOptions{ _, count, _ := models.QueryModel(&models.AiModelQueryOptions{
@@ -968,6 +969,7 @@ func SetModelCount(ctx *context.Context) {
New: MODEL_LATEST, New: MODEL_LATEST,
IsOnlyThisRepo: true, IsOnlyThisRepo: true,
Status: -1, Status: -1,
IsQueryPrivate: isQueryPrivate,
}) })
ctx.Data["MODEL_COUNT"] = count ctx.Data["MODEL_COUNT"] = count
} }
@@ -1224,6 +1226,7 @@ func QueryModelListForPredict(ctx *context.Context) {
if pageSize <= 0 { if pageSize <= 0 {
pageSize = -1 pageSize = -1
} }
isQueryPrivate := isQueryPrivateModel(ctx)
//IsOnlyThisRepo := ctx.QueryBool("isOnlyThisRepo") //IsOnlyThisRepo := ctx.QueryBool("isOnlyThisRepo")
modelResult, count, err := models.QueryModel(&models.AiModelQueryOptions{ modelResult, count, err := models.QueryModel(&models.AiModelQueryOptions{
ListOptions: models.ListOptions{ ListOptions: models.ListOptions{
@@ -1235,6 +1238,7 @@ func QueryModelListForPredict(ctx *context.Context) {
New: -1, New: -1,
Status: 0, Status: 0,
IsOnlyThisRepo: true, IsOnlyThisRepo: true,
IsQueryPrivate: isQueryPrivate,
}) })
if err != nil { if err != nil {
ctx.ServerError("Cloudbrain", err) ctx.ServerError("Cloudbrain", err)


Loading…
Cancel
Save