Skip to content

Commit

Permalink
Fix 404 when there is an internal version of package (go-gitea#27615)
Browse files Browse the repository at this point in the history
close go-gitea#27601
The Docker registry has an internal version, which leads to 404
  • Loading branch information
lng2020 authored and GiteaBot committed Oct 15, 2023
1 parent 148f6e3 commit 3800a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/user/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 3800a25

Please sign in to comment.