service/asset: fix updating custom type asset (#226)

service/asset: 修复更新自定义类型资源
This commit is contained in:
Q01
2022-02-27 13:14:14 +08:00
committed by GitHub
parent 6d3a6aee24
commit d7470c324d

View File

@ -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 {