add new check for overrideconfig to fix bug where external prediction call reset flow
This commit is contained in:
parent
24ceeb8671
commit
d83b57c349
|
|
@ -378,7 +378,6 @@ export class App {
|
||||||
nodeToExecuteData = this.chatflowPool.activeChatflows[chatflowid].endingNodeData
|
nodeToExecuteData = this.chatflowPool.activeChatflows[chatflowid].endingNodeData
|
||||||
} else {
|
} else {
|
||||||
/*** Get chatflows and prepare data ***/
|
/*** Get chatflows and prepare data ***/
|
||||||
|
|
||||||
const flowData = chatflow.flowData
|
const flowData = chatflow.flowData
|
||||||
const parsedFlowData: IReactFlowObject = JSON.parse(flowData)
|
const parsedFlowData: IReactFlowObject = JSON.parse(flowData)
|
||||||
const nodes = parsedFlowData.nodes
|
const nodes = parsedFlowData.nodes
|
||||||
|
|
|
||||||
|
|
@ -398,15 +398,20 @@ export const isSameOverrideConfig = (
|
||||||
existingOverrideConfig?: ICommonObject,
|
existingOverrideConfig?: ICommonObject,
|
||||||
newOverrideConfig?: ICommonObject
|
newOverrideConfig?: ICommonObject
|
||||||
): boolean => {
|
): boolean => {
|
||||||
|
// Skip check if its internal call
|
||||||
if (isInternal) return true
|
if (isInternal) return true
|
||||||
|
// If existing and new overrideconfig are the same
|
||||||
if (
|
if (
|
||||||
existingOverrideConfig &&
|
existingOverrideConfig &&
|
||||||
Object.keys(existingOverrideConfig).length &&
|
Object.keys(existingOverrideConfig).length &&
|
||||||
newOverrideConfig &&
|
newOverrideConfig &&
|
||||||
Object.keys(newOverrideConfig).length &&
|
Object.keys(newOverrideConfig).length &&
|
||||||
JSON.stringify(existingOverrideConfig) === JSON.stringify(newOverrideConfig)
|
JSON.stringify(existingOverrideConfig) === JSON.stringify(newOverrideConfig)
|
||||||
)
|
) {
|
||||||
return true
|
return true
|
||||||
|
}
|
||||||
|
// If there is no existing and new overrideconfig
|
||||||
|
if (!existingOverrideConfig && !newOverrideConfig) return true
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue