mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-03 05:39:55 +08:00
Fix maven panic when no package exists (#33888)
Fix #33886 Restore the old logic from #16510, which was incorrectly removed by #33678
This commit is contained in:
parent
0dfa94edc8
commit
45c4139134
@ -98,6 +98,11 @@ func serveMavenMetadata(ctx *context.Context, params parameters) {
|
|||||||
}
|
}
|
||||||
pvs = append(pvsLegacy, pvs...)
|
pvs = append(pvsLegacy, pvs...)
|
||||||
|
|
||||||
|
if len(pvs) == 0 {
|
||||||
|
apiError(ctx, http.StatusNotFound, packages_model.ErrPackageNotExist)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
pds, err := packages_model.GetPackageDescriptors(ctx, pvs)
|
pds, err := packages_model.GetPackageDescriptors(ctx, pvs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
apiError(ctx, http.StatusInternalServerError, err)
|
apiError(ctx, http.StatusInternalServerError, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user