1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Avoid 500 panic error when uploading invalid maven package file (#31014)

PackageDescriptor.Metadata might be nil (and maybe not only for maven).
This is only a quick fix.

The new `if` block is written intentionally to avoid unnecessary
indenting to the existing code.
This commit is contained in:
wxiaoguang
2024-05-20 14:44:16 +08:00
committed by GitHub
parent f48cc501c4
commit de9bcd1d23
4 changed files with 20 additions and 2 deletions

View File

@@ -3415,6 +3415,7 @@ error.unit_not_allowed = You are not allowed to access this repository section.
title = Packages
desc = Manage repository packages.
empty = There are no packages yet.
no_metadata = No metadata.
empty.documentation = For more information on the package registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>.
empty.repo = Did you upload a package, but it's not shown here? Go to <a href="%[1]s">package settings</a> and link it to this repo.
registry.documentation = For more information on the %s registry, see <a target="_blank" rel="noopener noreferrer" href="%s">the documentation</a>.