From 7480aacdad9470458fa0142beab54b8011bbac25 Mon Sep 17 00:00:00 2001 From: Nanguan Lin <70063547+lng2020@users.noreply.github.com> Date: Sun, 15 Oct 2023 17:22:10 +0800 Subject: Fix 404 when there is an internal version of package (#27615) close #27601 The Docker registry has an internal version, which leads to 404 --- routers/web/user/package.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers/web/user') diff --git a/routers/web/user/package.go b/routers/web/user/package.go index 146b94dfdf..cc200cc4d7 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() } -- cgit v1.2.3