Skip to content

Commit

Permalink
python: fix improper call to set_directed
Browse files Browse the repository at this point in the history
Problem: there is a typo in the jsongraph Edge code which
invokes `is_directed()` instead of `set_directed()`.

Fix it.
  • Loading branch information
jameshcorbett committed Sep 18, 2024
1 parent 846a327 commit 4392e83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/fluxion/jsongraph/objects/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def add_edge(self, edge, force_direction=False):#TODO check existence of node id
if isinstance(edge, Edge):
if self._directed:
if edge.is_directed() == None:
edge.is_directed(True)
edge.set_directed(True)
if not edge.is_directed() and not force_direction:
ValueError("Adding undirected edge to directed graph")
if not edge.is_directed() and force_direction:
Expand Down

0 comments on commit 4392e83

Please sign in to comment.