summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-04-01 12:45:51 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-04-01 12:45:51 -0400
commit3b7ef1b32dfd8e9d93ffd99f4c40a1d020b083d1 (patch)
tree10bd99872d1fd98ce20ad0980c5147f5e365c538 /lib/sqlalchemy/sql
parent1258d1ed9e8064e08fd77d2dc3938fcebc130800 (diff)
downloadsqlalchemy-3b7ef1b32dfd8e9d93ffd99f4c40a1d020b083d1.tar.gz
- id(obj) is no longer used internally within topological.py,
as the sorting functions now require hashable objects only. [ticket:1756]
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/util.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py
index d5575e0e7..5a439b099 100644
--- a/lib/sqlalchemy/sql/util.py
+++ b/lib/sqlalchemy/sql/util.py
@@ -15,7 +15,8 @@ def sort_tables(tables):
parent_table = fkey.column.table
if parent_table in tables:
child_table = fkey.parent.table
- tuples.append( ( parent_table, child_table ) )
+ if parent_table is not child_table:
+ tuples.append((parent_table, child_table))
for table in tables:
visitors.traverse(table, {'schema_visitor':True}, {'foreign_key':visit_foreign_key})