Skip to content

Commit 171950a

Browse files
GiteaBotlng2020
andauthored
Fix 404 when deleting Docker package with an internal version (go-gitea#27615) (go-gitea#27629)
Backport go-gitea#27615 by @lng2020 close go-gitea#27601 The Docker registry has an internal version, which leads to 404 Co-authored-by: Nanguan Lin <[email protected]>
1 parent 7b96f71 commit 171950a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/user/package.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func PackageSettingsPost(ctx *context.Context) {
422422

423423
redirectURL := ctx.Package.Owner.HomeLink() + "/-/packages"
424424
// redirect to the package if there are still versions available
425-
if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID}); has {
425+
if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID, IsInternal: util.OptionalBoolFalse}); has {
426426
redirectURL = ctx.Package.Descriptor.PackageWebLink()
427427
}
428428

0 commit comments

Comments
 (0)