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.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py
index 2a9d027e7..9a7f2dd19 100644
--- a/lib/sqlalchemy/topological.py
+++ b/lib/sqlalchemy/topological.py
@@ -133,8 +133,9 @@ class QueueDependencySorter(object):
lead.cycles.add(edge[1])
if n is not None:
queue.append(n)
- if n is not lead:
- n._cyclical = True
+ for n in lead.cycles:
+ if n is not lead:
+ n._cyclical = True
# loop through cycle
# remove edges from the edge dictionary
# install the cycled nodes in the "cycle" list of one of the nodes