diff --git a/web/src/components/EnvironmentForm.vue b/web/src/components/EnvironmentForm.vue index a4ec6cce..9bbbb2ba 100644 --- a/web/src/components/EnvironmentForm.vue +++ b/web/src/components/EnvironmentForm.vue @@ -142,7 +142,7 @@ v.id === val.id); + const i = this.secrets.findIndex((v) => v.name === val.name); if (i > -1) { - if (this.secrets[i].new) { - this.secrets.splice(i, 1); - } else { - this.secrets[i].remove = true; + const s = this.secrets[i]; + this.secrets.splice(i, 1); + + if (!this.secrets[i].new) { + this.secrets.push({ + ...s, + remove: true, + }); } } }, @@ -304,7 +308,7 @@ export default { if (s.new) { operation = 'create'; } else if (s.remove) { - operation = 'remove'; + operation = 'delete'; } else if (s.value !== '') { operation = 'update'; }