File tree Expand file tree Collapse file tree
packages/server/src/services/variables Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,10 +103,9 @@ const updateVariable = async (variable: Variable, updatedVariable: Variable) =>
103103 if ( appServer . identityManager . getPlatformType ( ) === Platform . CLOUD && updatedVariable . type === 'runtime' )
104104 throw new InternalFlowiseError ( StatusCodes . BAD_REQUEST , 'Cloud platform does not support runtime variables!' )
105105 try {
106+ const originalWorkspaceId = variable . workspaceId
106107 const tmpUpdatedVariable = await appServer . AppDataSource . getRepository ( Variable ) . merge ( variable , updatedVariable )
107- const originalWorkspaceId = variable . workspaceId ;
108- const tmpUpdatedVariable = await appServer . AppDataSource . getRepository ( Variable ) . merge ( variable , updatedVariable ) ;
109- tmpUpdatedVariable . workspaceId = originalWorkspaceId ;
108+ tmpUpdatedVariable . workspaceId = originalWorkspaceId
110109 const dbResponse = await appServer . AppDataSource . getRepository ( Variable ) . save ( tmpUpdatedVariable )
111110 return dbResponse
112111 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments