summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/topological.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/topological.py')
-rw-r--r--lib/sqlalchemy/topological.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py
index d8ed550b0..bd8b45f95 100644
--- a/lib/sqlalchemy/topological.py
+++ b/lib/sqlalchemy/topological.py
@@ -166,6 +166,7 @@ class _EdgeCollection(object):
def _sort(tuples, allitems, allow_cycles=False, ignore_self_cycles=False):
nodes = {}
edges = _EdgeCollection()
+
for item in list(allitems) + [t[0] for t in tuples] + [t[1] for t in tuples]:
if id(item) not in nodes:
node = _Node(item)