Skip to content

Commit

Permalink
fix: 修复流程导入导出引用第三方插件变量报错问题 #7600
Browse files Browse the repository at this point in the history
  • Loading branch information
guohelu committed Nov 5, 2024
1 parent a5b517f commit d85367b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions gcloud/template_base/domains/schema_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,19 @@ def _reconvert_nodes_in_tree(self, nodes: dict, reconverted_tree: dict, cur_temp
for form_key, param in data.items():
if "key" in param:
source_info = (node["id"], form_key)

if node.get("component", {}).get("code") == "remote_plugin":
source_tag = "{}.{}".format(
activity["component"]["data"]["plugin_code"]["value"], form_key
)
else:
source_tag = "{}.{}".format(activity["component"]["code"], form_key)

constant, is_create = self._reconvert_constant(
constant=param,
cur_constants=reconverted_tree["constants"],
source_info=source_info,
source_tag="{}.{}".format(activity["component"]["code"], form_key),
source_tag=source_tag,
source_type=source_type,
)
if is_create:
Expand Down Expand Up @@ -387,7 +395,8 @@ def _reconvert_tree(self, template: dict, cur_templates: dict):
if "constants" in template:
for constant_key, constant_attrs in template["constants"].items():
reconverted_constant, is_create = self._reconvert_constant(
constant={**constant_attrs, "key": constant_key}, cur_constants=reconverted_tree["constants"],
constant={**constant_attrs, "key": constant_key},
cur_constants=reconverted_tree["constants"],
)
if is_create:
reconverted_tree["constants"][constant_key] = reconverted_constant
Expand Down

0 comments on commit d85367b

Please sign in to comment.