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

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(