Skip to content

Commit

Permalink
Bugfix/Save default credential data when add new (FlowiseAI#3435)
Browse files Browse the repository at this point in the history
save default credential data when add new
  • Loading branch information
HenryHengZJ authored Nov 1, 2024
1 parent c3c6f48 commit 598f9a6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import useApi from '@/hooks/useApi'

// utils
import useNotifier from '@/utils/useNotifier'
import { initializeDefaultNodeData } from '@/utils/genericHelper'

// const
import { baseURL, REDACTED_CREDENTIAL_VALUE } from '@/store/constant'
Expand Down Expand Up @@ -95,7 +96,8 @@ const AddEditCredentialDialog = ({ show, dialogProps, onCancel, onConfirm, setEr
// When credential dialog is to add a new credential
setName('')
setCredential({})
setCredentialData({})
const defaultCredentialData = initializeDefaultNodeData(dialogProps.credentialComponent.inputs)
setCredentialData(defaultCredentialData)
setComponentCredential(dialogProps.credentialComponent)
}

Expand Down

0 comments on commit 598f9a6

Please sign in to comment.