Skip to content

Commit 3c408cc

Browse files
committed
fix: enhance comparison logic for different source_value types
1 parent 4087e54 commit 3c408cc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/application/flow/step_node/condition_node/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)

0 commit comments

Comments
 (0)