service/asset: fix updating custom type asset (#226)
service/asset: 修复更新自定义类型资源
This commit is contained in:
@ -228,6 +228,12 @@ func (s assetService) UpdateById(id string, m echo.Map) error {
|
|||||||
item.PrivateKey = "-"
|
item.PrivateKey = "-"
|
||||||
item.Passphrase = "-"
|
item.Passphrase = "-"
|
||||||
item.CredentialId = "-"
|
item.CredentialId = "-"
|
||||||
|
if len(item.Username) == 0 {
|
||||||
|
item.Username = "-"
|
||||||
|
}
|
||||||
|
if len(item.Password) == 0 {
|
||||||
|
item.Password = "-"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(item.Tags) == 0 {
|
if len(item.Tags) == 0 {
|
||||||
|
Reference in New Issue
Block a user