Skip to content

Commit 4c104cf

Browse files
lng2020GiteaBot
authored andcommitted
Fix 404 when there is an internal version of package (go-gitea#27615)
close go-gitea#27601 The Docker registry has an internal version, which leads to 404
1 parent 7b96f71 commit 4c104cf

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)