mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Bugfix/Credential mandatory field when preview chunks (#2356)
check if credential is mandatory field when preview chunks
This commit is contained in:
@@ -120,9 +120,14 @@ const LoaderConfigPreviewChunks = () => {
|
||||
let canSubmit = true
|
||||
const inputParams = (selectedDocumentLoader.inputParams ?? []).filter((inputParam) => !inputParam.hidden)
|
||||
for (const inputParam of inputParams) {
|
||||
if (!inputParam.optional && !selectedDocumentLoader.inputs[inputParam.name]) {
|
||||
if (!inputParam.optional && (!selectedDocumentLoader.inputs[inputParam.name] || !selectedDocumentLoader.credential)) {
|
||||
if (inputParam.type === 'credential' && !selectedDocumentLoader.credential) {
|
||||
canSubmit = false
|
||||
break
|
||||
} else if (inputParam.type !== 'credential' && !selectedDocumentLoader.inputs[inputParam.name]) {
|
||||
canSubmit = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!canSubmit) {
|
||||
|
||||
Reference in New Issue
Block a user