From 6a3bc9fb584e94f22a39f438211c281c4566a098 Mon Sep 17 00:00:00 2001 From: lng2020 Date: Sat, 14 Oct 2023 19:41:33 +0800 Subject: [PATCH] fix package 404 when there is an internal version --- routers/web/user/package.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/user/package.go b/routers/web/user/package.go index 146b94dfdf3cf..cc200cc4d7b55 100644 --- a/routers/web/user/package.go +++ b/routers/web/user/package.go @@ -449,7 +449,7 @@ func PackageSettingsPost(ctx *context.Context) { redirectURL := ctx.Package.Owner.HomeLink() + "/-/packages" // redirect to the package if there are still versions available - if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID}); has { + if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID, IsInternal: util.OptionalBoolFalse}); has { redirectURL = ctx.Package.Descriptor.PackageWebLink() }