File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ def topo_sort(graph):
4242 if (master := extract_master (part )) in graph :
4343 for edge in graph .in_edges (part ):
4444 parent = edge [0 ]
45- if parent != master and extract_master (parent ) != master :
45+ if master not in (parent , extract_master (parent )):
46+ # if parent is neither master nor part of master
4647 graph .add_edge (parent , master )
4748 sorted_nodes = list (nx .topological_sort (graph ))
4849
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class Diagram(nx.DiGraph):
7171 Only those tables that are loaded in the connection object are displayed
7272 """
7373
74- def __init__ (self , source = None , context = None ):
74+ def __init__ (self , source , context = None ):
7575
7676 if isinstance (source , Diagram ):
7777 # copy constructor
You can’t perform that action at this time.
0 commit comments