Skip to content

Commit 066aee2

Browse files
GiteaBotlng2020
andauthored
Fix 404 when deleting Docker package with an internal version (#27615) (#27630)
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>
1 parent 148f6e3 commit 066aee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/user/package.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ func PackageSettingsPost(ctx *context.Context) {
449449

450450
redirectURL := ctx.Package.Owner.HomeLink() + "/-/packages"
451451
// redirect to the package if there are still versions available
452-
if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID}); has {
452+
if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID, IsInternal: util.OptionalBoolFalse}); has {
453453
redirectURL = ctx.Package.Descriptor.PackageWebLink()
454454
}
455455

0 commit comments

Comments
 (0)