mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Merge pull request #9450 from jakemcdermott/fix-9230
Use credential_type for prompted multicred select categories Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
e1e0bb30a9
@ -167,9 +167,10 @@ function CredentialsStep({ i18n }) {
|
||||
const hasSameVaultID = val =>
|
||||
val?.inputs?.vault_id !== undefined &&
|
||||
val?.inputs?.vault_id === item?.inputs?.vault_id;
|
||||
const hasSameKind = val => val.kind === item.kind;
|
||||
const hasSameCredentialType = val =>
|
||||
val.credential_type === item.credential_type;
|
||||
const newItems = field.value.filter(i =>
|
||||
isVault ? !hasSameVaultID(i) : !hasSameKind(i)
|
||||
isVault ? !hasSameVaultID(i) : !hasSameCredentialType(i)
|
||||
);
|
||||
newItems.push(item);
|
||||
helpers.setValue(newItems);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user