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

Backport #31014 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-05-20 07:10:27 +00:00
committed by GitHub
co-authored by wxiaoguang
parent a798a1eb17
commit 3d3123d553
4 changed files with 20 additions and 2 deletions
+5 -1
View File
@@ -1,4 +1,8 @@
{{if eq .PackageDescriptor.Package.Type "maven"}}
{{if and (eq .PackageDescriptor.Package.Type "maven") (not .PackageDescriptor.Metadata)}}
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">{{ctx.Locale.Tr "packages.no_metadata"}}</div>
{{end}}
{{if and (eq .PackageDescriptor.Package.Type "maven") .PackageDescriptor.Metadata}}
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
<div class="ui form">