Update postgres_impl.py

fix get_all_labels error
This commit is contained in:
widgit 2025-04-22 19:49:31 +10:00 committed by GitHub
parent 0328445108
commit 439201face
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1807,7 +1807,10 @@ class PGGraphStorage(BaseGraphStorage):
)
results = await self._query(query)
labels = [result["label"] for result in results]
labels = []
for result in results:
if result and isinstance(result, dict) and "label" in result:
labels.append(result["label"])
return labels
async def get_knowledge_graph(