mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 20:29:08 +00:00
feat(editor): Add Python to Code actions (#18668)
This commit is contained in:
@@ -1586,6 +1586,15 @@ function resolveResourceAndOperation(
|
||||
nodeParameters: INodeParameters,
|
||||
nodeTypeDescription: INodeTypeDescription,
|
||||
) {
|
||||
if (nodeTypeDescription.name === 'n8n-nodes-base.code') {
|
||||
const language = nodeParameters.language as string;
|
||||
const langProp = nodeTypeDescription.properties.find((p) => p.name === 'language');
|
||||
if (langProp?.options && isINodePropertyOptionsList(langProp.options)) {
|
||||
const found = langProp.options.find((o) => o.value === language);
|
||||
if (found?.action) return { action: found.action };
|
||||
}
|
||||
}
|
||||
|
||||
const resource = nodeParameters.resource as string;
|
||||
const operation = nodeParameters.operation as string;
|
||||
const nodeTypeOperation = nodeTypeDescription.properties.find(
|
||||
|
||||
Reference in New Issue
Block a user