aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/user
diff options
context:
space:
mode:
authorNanguan Lin <70063547+lng2020@users.noreply.github.com>2023-10-15 17:22:10 +0800
committerGitHub <noreply@github.com>2023-10-15 09:22:10 +0000
commit7480aacdad9470458fa0142beab54b8011bbac25 (patch)
treea48470187cdb63154e6b1aaf07c94c530fe10048 /routers/web/user
parent4f6043f55475a17a62229b92d145cd060767a539 (diff)
downloadgitea-7480aacdad9470458fa0142beab54b8011bbac25.tar.gz
gitea-7480aacdad9470458fa0142beab54b8011bbac25.zip
Fix 404 when there is an internal version of package (#27615)
close #27601 The Docker registry has an internal version, which leads to 404
Diffstat (limited to 'routers/web/user')
-rw-r--r--routers/web/user/package.go2
1 files changed, 1 insertions, 1 deletions
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()
}