Skip to content

Commit 2151c51

Browse files
authored
fix: Variable assignment data type converted (#4279)
1 parent 57195f2 commit 2151c51

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

apps/application/flow/compare/contain_compare.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ def support(self, node_id, fields: List[str], source_value, compare, target_valu
2020
def compare(self, source_value, compare, target_value):
2121
if isinstance(source_value, str):
2222
return str(target_value) in source_value
23-
return any([str(item) == str(target_value) for item in source_value])
23+
elif isinstance(source_value, list):
24+
return any([str(item) == str(target_value) for item in source_value])
25+
else:
26+
return str(target_value) in str(source_value)

apps/application/flow/compare/not_contain_compare.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ def support(self, node_id, fields: List[str], source_value, compare, target_valu
2020
def compare(self, source_value, compare, target_value):
2121
if isinstance(source_value, str):
2222
return str(target_value) not in source_value
23-
return not any([str(item) == str(target_value) for item in source_value])
23+
elif isinstance(self, list):
24+
return not any([str(item) == str(target_value) for item in source_value])
25+
else:
26+
return str(target_value) not in str(source_value)

apps/application/flow/step_node/variable_assign_node/impl/base_variable_assign_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ def execute(self, variable_list, stream, **kwargs) -> NodeResult:
8686
return NodeResult({'variable_list': variable_list, 'result_list': result_list}, {})
8787

8888
def get_reference_content(self, fields: List[str]):
89-
return str(self.workflow_manage.get_reference_field(
89+
return self.workflow_manage.get_reference_field(
9090
fields[0],
91-
fields[1:]))
91+
fields[1:])
9292

9393
def get_details(self, index: int, **kwargs):
9494
return {

0 commit comments

Comments
 (0)