Skip to content

Commit 5198801

Browse files
fix: Fix the parsing error of image_id
1 parent adc87e3 commit 5198801

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

apps/application/flow/step_node/variable_aggregation_node/impl/base_variable_aggregation_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BaseVariableAggregationNode(IVariableAggregation):
2424

2525
def save_context(self, details, workflow_manage):
2626
for key, value in details.get('result').items():
27-
self.context['key'] = value
27+
self.context[key] = value
2828
self.context['result'] = details.get('result')
2929
self.context['strategy'] = details.get('strategy')
3030
self.context['group_list'] = details.get('group_list')

apps/application/serializers/application_chat_record.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def reset_chat_record(chat_record, show_source, show_exec):
169169
'padding_problem_text': chat_record.details.get('problem_padding').get(
170170
'padding_problem_text') if 'problem_padding' in chat_record.details else None,
171171
**(show_source_dict if show_source else {}),
172-
**(show_exec_dict if show_exec else show_exec_dict)
172+
**(show_exec_dict if show_exec else {})
173173
}
174174

175175
def page(self, current_page: int, page_size: int, with_valid=True, show_source=None, show_exec=None):

apps/common/handle/impl/text/zip_split_handle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def get_image_list(result_list: list, zip_files: List[str]):
8383
if not zip_files.__contains__(image_path):
8484
continue
8585
if image_path.startswith('oss/file/') or image_path.startswith('oss/image/'):
86-
image_id = image_path.replace('oss/file/', '').replace('oss/file/', '')
86+
image_id = image_path.replace('oss/file/', '').replace('oss/image/', '')
8787
if is_valid_uuid(image_id):
8888
image_file_list.append({'source_file': image_path,
8989
'image_id': image_id})
@@ -115,7 +115,7 @@ def get_image_list_by_content(name: str, content: str, zip_files: List[str]):
115115
if not zip_files.__contains__(image_path):
116116
continue
117117
if image_path.startswith('oss/file/') or image_path.startswith('oss/image/'):
118-
image_id = image_path.replace('oss/file/', '').replace('oss/file/', '')
118+
image_id = image_path.replace('oss/file/', '').replace('oss/image/', '')
119119
if is_valid_uuid(image_id):
120120
image_file_list.append({'source_file': image_path,
121121
'image_id': image_id})

apps/knowledge/serializers/document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def table_export(self, with_valid=True):
257257
"rb")
258258
content = file.read()
259259
file.close()
260-
return HttpResponse(content, status=200, headers={'Content-Type': 'text/cxv',
260+
return HttpResponse(content, status=200, headers={'Content-Type': 'text/csv',
261261
'Content-Disposition': 'attachment; filename="csv_template.csv"'})
262262
elif self.data.get('type') == 'excel':
263263
file = open(os.path.join(PROJECT_DIR, "apps", "knowledge", 'template',

0 commit comments

Comments
 (0)