mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-15 20:27:20 +08:00
Fix: sort memory by create_time desc (#16942)
This commit is contained in:
@@ -270,6 +270,7 @@ async def list_memory(filter_params: dict, keywords: str, page: int = 1, page_si
|
||||
|
||||
memory_list, count = MemoryService.get_by_filter(filter_dict, keywords, page, page_size)
|
||||
[memory.update({"memory_type": get_memory_type_human(memory["memory_type"])}) for memory in memory_list]
|
||||
memory_list.sort(key=lambda m: m["create_time"], reverse=True)
|
||||
return {"memory_list": memory_list, "total_count": count}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user