mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Use credential_type for prompted multicred select categories
This commit is contained in:
parent
d1c49d45bf
commit
e92f1187d2
@ -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