fix secret updating (#828)

This commit is contained in:
Anbraten 2022-03-03 15:24:20 +01:00 committed by GitHub
parent 313e72e56a
commit 90dcc77870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -88,10 +88,10 @@ func PatchSecret(c *gin.Context) {
if in.Value != "" {
secret.Value = in.Value
}
if len(in.Events) != 0 {
if in.Events != nil {
secret.Events = in.Events
}
if len(in.Images) != 0 {
if in.Images != nil {
secret.Images = in.Images
}

View file

@ -133,7 +133,10 @@ export default defineComponent({
},
set(value) {
if (selectedSecret.value) {
selectedSecret.value.image = value.split(',').map((s) => s.trim());
selectedSecret.value.image = value
.split(',')
.map((s) => s.trim())
.filter((s) => s !== '');
}
},
});