From a2fc7c18f99a26b4d1ade86aa40d701c3288af5d Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 9 Dec 2022 11:12:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=8E=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 63ef4bf80..7bd286602 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -956,6 +956,7 @@ func ShowOneVersionOtherModel(ctx *context.Context) { } func SetModelCount(ctx *context.Context) { + isQueryPrivate := isQueryPrivateModel(ctx) repoId := ctx.Repo.Repository.ID Type := -1 _, count, _ := models.QueryModel(&models.AiModelQueryOptions{ @@ -968,6 +969,7 @@ func SetModelCount(ctx *context.Context) { New: MODEL_LATEST, IsOnlyThisRepo: true, Status: -1, + IsQueryPrivate: isQueryPrivate, }) ctx.Data["MODEL_COUNT"] = count } @@ -1224,6 +1226,7 @@ func QueryModelListForPredict(ctx *context.Context) { if pageSize <= 0 { pageSize = -1 } + isQueryPrivate := isQueryPrivateModel(ctx) //IsOnlyThisRepo := ctx.QueryBool("isOnlyThisRepo") modelResult, count, err := models.QueryModel(&models.AiModelQueryOptions{ ListOptions: models.ListOptions{ @@ -1235,6 +1238,7 @@ func QueryModelListForPredict(ctx *context.Context) { New: -1, Status: 0, IsOnlyThisRepo: true, + IsQueryPrivate: isQueryPrivate, }) if err != nil { ctx.ServerError("Cloudbrain", err)