From e92f1187d23f19685cb55b3110d948ac4e367a2e Mon Sep 17 00:00:00 2001 From: Jake McDermott Date: Tue, 2 Mar 2021 10:27:49 -0500 Subject: [PATCH] Use credential_type for prompted multicred select categories --- .../src/components/LaunchPrompt/steps/CredentialsStep.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx b/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx index 1b736c6ad0..a3659d43f7 100644 --- a/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx +++ b/awx/ui_next/src/components/LaunchPrompt/steps/CredentialsStep.jsx @@ -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);