Skip to content

Commit a3a97b7

Browse files
committed
Resolve references to edge in Diagram.make_dot
1 parent 2fe2ec3 commit a3a97b7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

datajoint/diagram.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,14 @@ def make_dot(self):
438438

439439
for edge in dot.get_edges():
440440
# see https://graphviz.org/doc/info/attrs.html
441-
src = edge.get_source().strip('"')
442-
dest = edge.get_destination().strip('"')
441+
src = edge.get_source()
442+
dest = edge.get_destination()
443443
props = graph.get_edge_data(src, dest)
444+
if props is None:
445+
raise DataJointError(
446+
"Could not find edge with source "
447+
"'{}' and destination '{}'".format(src, dest)
448+
)
444449
edge.set_color("#00000040")
445450
edge.set_style("solid" if props["primary"] else "dashed")
446451
master_part = graph.nodes[dest][

0 commit comments

Comments
 (0)