Skip to content

Commit f307154

Browse files
rakillenrobertpatrick
authored andcommitted
Merge secrets data into save structure instead of overwriting
1 parent 0bc5bb9 commit f307154

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

webui/src/js/models/k8s-domain-definition.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,12 @@ define(['knockout', 'utils/observable-properties', 'utils/common-utilities', 'ut
290290
props.createGroup(name, this).writeTo(json);
291291

292292
this.updateInternalFields();
293-
props.createGroup(name, internalFields).writeTo(json);
293+
294+
// build a temporary JSON structure from internal fields, then merge to the project JSON
295+
const internalJson = {};
296+
props.createGroup(name, internalFields).writeTo(internalJson);
297+
json[name] = json[name] || {}; // create section if not existing
298+
Object.assign(json[name], internalJson[name]);
294299

295300
// Force the generated runtime secret to be written to the project.
296301
// This will allow us to keep the same generated password for the life

0 commit comments

Comments
 (0)