Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Fix bug with NetworkX.hasedge method, closes #834

davidmezzetticab131e92a88
diff --git a/src/python/txtai/graph/networkx.py b/src/python/txtai/graph/networkx.py
index ae95e5ae..b838e244 100644
--- a/src/python/txtai/graph/networkx.py
+++ b/src/python/txtai/graph/networkx.py
@@ -94,7 +94,7 @@ class NetworkX(Graph):
self.backend.add_edges_from(edges)
def hasedge(self, source, target=None):
- if not target:
+ if target is None:
edges = self.backend.adj.get(source)
return len(edges) > 0 if edges else False