mirror of
https://github.com/ansible/awx.git
synced 2026-02-27 07:56:06 -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:
@@ -167,9 +167,10 @@ function CredentialsStep({ i18n }) {
|
|||||||
const hasSameVaultID = val =>
|
const hasSameVaultID = val =>
|
||||||
val?.inputs?.vault_id !== undefined &&
|
val?.inputs?.vault_id !== undefined &&
|
||||||
val?.inputs?.vault_id === item?.inputs?.vault_id;
|
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 =>
|
const newItems = field.value.filter(i =>
|
||||||
isVault ? !hasSameVaultID(i) : !hasSameKind(i)
|
isVault ? !hasSameVaultID(i) : !hasSameCredentialType(i)
|
||||||
);
|
);
|
||||||
newItems.push(item);
|
newItems.push(item);
|
||||||
helpers.setValue(newItems);
|
helpers.setValue(newItems);
|
||||||
|
|||||||
Reference in New Issue
Block a user