Skip to content

Commit c735aaa

Browse files
committed
fix: skip processing when field value is empty in search document conditions
1 parent 6e87cef commit c735aaa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/application/flow/step_node/search_document_node/impl/base_search_document_node.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ def handle_custom_tags(self, document_id_list: List, search_condition_list: list
120120
field_value = self.workflow_manage.generate_prompt(condition['value'])
121121
compare_type = condition['compare']
122122

123+
if field_value:
124+
continue
125+
123126
# 构建查询条件
124127
if compare_type == 'not_contain':
125128
# 反向查询:找出包含该标签的文档,然后排除
@@ -156,6 +159,9 @@ def handle_custom_tags(self, document_id_list: List, search_condition_list: list
156159
field_value = self.workflow_manage.generate_prompt(condition['value'])
157160
compare_type = condition['compare']
158161

162+
if field_value:
163+
continue
164+
159165
if compare_type == 'not_contain':
160166
# 反向查询:找出包含该标签的文档,然后用全集减去
161167
exclude_docs = set(QuerySet(DocumentTag).filter(

0 commit comments

Comments
 (0)