mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refactor: remove useless initialize logic in list_doc (#8523)
### What problem does this PR solve? Remove useless logic in a loop for list_doc ### Type of change - [x] Refactoring - [x] Performance Improvement
This commit is contained in:
@ -519,7 +519,6 @@ def list_docs(dataset_id, tenant_id):
|
||||
|
||||
# rename key's name
|
||||
renamed_doc_list = []
|
||||
for doc in docs:
|
||||
key_mapping = {
|
||||
"chunk_num": "chunk_count",
|
||||
"kb_id": "dataset_id",
|
||||
@ -533,6 +532,7 @@ def list_docs(dataset_id, tenant_id):
|
||||
"3": "DONE",
|
||||
"4": "FAIL",
|
||||
}
|
||||
for doc in docs:
|
||||
renamed_doc = {}
|
||||
for key, value in doc.items():
|
||||
if key == "run":
|
||||
|
||||
Reference in New Issue
Block a user