From fe05fe9e027374ddf1342df3af9acdefb05f2b53 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 16 Nov 2021 11:36:00 +0100 Subject: [PATCH] Fix code generation for Python (provide data cube to .process()) --- src/export/python.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/export/python.js b/src/export/python.js index ddbd7b843..271ff4cb8 100644 --- a/src/export/python.js +++ b/src/export/python.js @@ -89,13 +89,13 @@ export default class Python extends Exporter { if (this.hasCallbackParameter(node) || node.process_id === 'save_result') { builderName = `${dcName}.${node.process_id}`; addProcessToArguments = false; + // If we call the process directly on a new data cube with dcName + // we need to remove the argument that is passing this data + filterDcName = (key, value) => Utils.isObject(value) && value.from_node && this.var(value.from_node) === dcName; } else { builderName = `${dcName}.process`; } - // If we call the process directly on a new data cube with dcName - // we need to remove the argument that is passing this data - filterDcName = (key, value) => Utils.isObject(value) && value.from_node && this.var(value.from_node) === dcName; } } let args = await this.generateArguments(node, false, filterDcName);