mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Fix 404 when there is an internal version of package (#27615)
close #27601 The Docker registry has an internal version, which leads to 404
This commit is contained in:
parent
4f6043f554
commit
7480aacdad
@ -449,7 +449,7 @@ func PackageSettingsPost(ctx *context.Context) {
|
|||||||
|
|
||||||
redirectURL := ctx.Package.Owner.HomeLink() + "/-/packages"
|
redirectURL := ctx.Package.Owner.HomeLink() + "/-/packages"
|
||||||
// redirect to the package if there are still versions available
|
// 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()
|
redirectURL = ctx.Package.Descriptor.PackageWebLink()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user