mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
Fix: "AttributeError(\"'list' object has no attribute 'get'\")" (#12518)
### What problem does this PR solve? https://github.com/infiniflow/ragflow/issues/12515 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -38,6 +38,8 @@ def get_value(d, k1, k2):
|
||||
|
||||
|
||||
def chunks_format(reference):
|
||||
if not reference or (reference is not dict):
|
||||
return []
|
||||
return [
|
||||
{
|
||||
"id": get_value(chunk, "chunk_id", "id"),
|
||||
|
||||
Reference in New Issue
Block a user