Merge pull request #6433 from open-webui/dev

fix: knowledge issue
This commit is contained in:
Timothy Jaeryang Baek 2024-10-26 01:19:38 -07:00 committed by GitHub
commit 1cd7d83f50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,8 +50,11 @@ async def get_knowledge_items(
knowledge_bases = []
for knowledge in Knowledges.get_knowledge_items():
files = []
if knowledge.data:
files = Files.get_file_metadatas_by_ids(
knowledge.data.get("file_ids", []) if knowledge.data else []
knowledge.data.get("file_ids", [])
)
# Check if all files exist