Bugfix/update workspaceId to vars (#4891)

update workspaceId to vars
This commit is contained in:
Henry Heng
2025-07-17 15:43:13 +01:00
committed by GitHub
parent 9839009823
commit 8a6b95ef0e
7 changed files with 21 additions and 6 deletions
+4 -1
View File
@@ -943,10 +943,13 @@ export const getVars = async (
nodeData: INodeData,
options: ICommonObject
) => {
if (!options.workspaceId) {
return []
}
const variables =
((await appDataSource
.getRepository(databaseEntities['Variable'])
.findBy(options.workspaceId ? { workspaceId: Equal(options.workspaceId) } : {})) as IVariable[]) ?? []
.findBy({ workspaceId: Equal(options.workspaceId) })) as IVariable[]) ?? []
// override variables defined in overrideConfig
// nodeData.inputs.vars is an Object, check each property and override the variable