diff --git a/apps/application/flow/step_node/variable_aggregation_node/impl/base_variable_aggregation_node.py b/apps/application/flow/step_node/variable_aggregation_node/impl/base_variable_aggregation_node.py index fa1d6479e5c..341f2e0eab9 100644 --- a/apps/application/flow/step_node/variable_aggregation_node/impl/base_variable_aggregation_node.py +++ b/apps/application/flow/step_node/variable_aggregation_node/impl/base_variable_aggregation_node.py @@ -24,7 +24,7 @@ class BaseVariableAggregationNode(IVariableAggregation): def save_context(self, details, workflow_manage): for key, value in details.get('result').items(): - self.context['key'] = value + self.context[key] = value self.context['result'] = details.get('result') self.context['strategy'] = details.get('strategy') self.context['group_list'] = details.get('group_list') diff --git a/apps/application/serializers/application_chat_record.py b/apps/application/serializers/application_chat_record.py index 540d9310dd9..820fc54e1a8 100644 --- a/apps/application/serializers/application_chat_record.py +++ b/apps/application/serializers/application_chat_record.py @@ -169,7 +169,7 @@ def reset_chat_record(chat_record, show_source, show_exec): 'padding_problem_text': chat_record.details.get('problem_padding').get( 'padding_problem_text') if 'problem_padding' in chat_record.details else None, **(show_source_dict if show_source else {}), - **(show_exec_dict if show_exec else show_exec_dict) + **(show_exec_dict if show_exec else {}) } def page(self, current_page: int, page_size: int, with_valid=True, show_source=None, show_exec=None): diff --git a/apps/common/handle/impl/text/zip_split_handle.py b/apps/common/handle/impl/text/zip_split_handle.py index d8365d5c285..498afbea848 100644 --- a/apps/common/handle/impl/text/zip_split_handle.py +++ b/apps/common/handle/impl/text/zip_split_handle.py @@ -83,7 +83,7 @@ def get_image_list(result_list: list, zip_files: List[str]): if not zip_files.__contains__(image_path): continue if image_path.startswith('oss/file/') or image_path.startswith('oss/image/'): - image_id = image_path.replace('oss/file/', '').replace('oss/file/', '') + image_id = image_path.replace('oss/file/', '').replace('oss/image/', '') if is_valid_uuid(image_id): image_file_list.append({'source_file': image_path, 'image_id': image_id}) @@ -115,7 +115,7 @@ def get_image_list_by_content(name: str, content: str, zip_files: List[str]): if not zip_files.__contains__(image_path): continue if image_path.startswith('oss/file/') or image_path.startswith('oss/image/'): - image_id = image_path.replace('oss/file/', '').replace('oss/file/', '') + image_id = image_path.replace('oss/file/', '').replace('oss/image/', '') if is_valid_uuid(image_id): image_file_list.append({'source_file': image_path, 'image_id': image_id}) diff --git a/apps/knowledge/serializers/document.py b/apps/knowledge/serializers/document.py index d8466663464..e52cf23bbd8 100644 --- a/apps/knowledge/serializers/document.py +++ b/apps/knowledge/serializers/document.py @@ -257,7 +257,7 @@ def table_export(self, with_valid=True): "rb") content = file.read() file.close() - return HttpResponse(content, status=200, headers={'Content-Type': 'text/cxv', + return HttpResponse(content, status=200, headers={'Content-Type': 'text/csv', 'Content-Disposition': 'attachment; filename="csv_template.csv"'}) elif self.data.get('type') == 'excel': file = open(os.path.join(PROJECT_DIR, "apps", "knowledge", 'template',