mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -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:
commit
287596234c
@ -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]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user