1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-30 09:41:11 -05:00

Fix 404 when deleting Docker package with an internal version (#27615) (#27629)

Backport #27615 by @lng2020

close #27601
The Docker registry has an internal version, which leads to 404

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
This commit is contained in:
Giteabot 2023-10-15 18:08:01 +08:00 committed by GitHub
parent 7b96f71bc7
commit 171950a0d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -422,7 +422,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()
} }