mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
feat(Code Node): Add Python support (#4295)
This commit is contained in:
@@ -1672,13 +1672,19 @@ export default mixins(
|
||||
},
|
||||
|
||||
async getNewNodeWithDefaultCredential(nodeTypeData: INodeTypeDescription) {
|
||||
let nodeVersion = nodeTypeData.defaultVersion;
|
||||
|
||||
if (nodeVersion === undefined) {
|
||||
nodeVersion = Array.isArray(nodeTypeData.version)
|
||||
? nodeTypeData.version.slice(-1)[0]
|
||||
: nodeTypeData.version;
|
||||
}
|
||||
|
||||
const newNodeData: INodeUi = {
|
||||
id: uuid(),
|
||||
name: nodeTypeData.defaults.name as string,
|
||||
type: nodeTypeData.name,
|
||||
typeVersion: Array.isArray(nodeTypeData.version)
|
||||
? nodeTypeData.version.slice(-1)[0]
|
||||
: nodeTypeData.version,
|
||||
typeVersion: nodeVersion,
|
||||
position: [0, 0],
|
||||
parameters: {},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user