mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 22:46:01 -03:30
Merge pull request #13874 from marshmalien/8898-fix-update-vault-credentials
Fix vault credential update error when vault_id is missing
This commit is contained in:
@@ -91,6 +91,11 @@ function CredentialEdit({ credential }) {
|
||||
modifiedData.user = me.id;
|
||||
}
|
||||
}
|
||||
|
||||
if (credential.kind === 'vault' && !credential.inputs?.vault_id) {
|
||||
delete modifiedData.inputs.vault_id;
|
||||
}
|
||||
|
||||
const [{ data }] = await Promise.all([
|
||||
CredentialsAPI.update(credId, modifiedData),
|
||||
...destroyInputSources(),
|
||||
@@ -100,7 +105,7 @@ function CredentialEdit({ credential }) {
|
||||
|
||||
return data;
|
||||
},
|
||||
[me, credId]
|
||||
[me, credId, credential]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user