From 79c0aa6b7320f94399634d02997faacbb6ced1d7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 25 Nov 2014 23:33:47 -0500 Subject: [PATCH] - use self.parent, not table here as there's an attributeerror trap for self.table that behaves differently in py3k --- lib/sqlalchemy/sql/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 8b2eb12f0c..4093d7115b 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -2647,7 +2647,7 @@ class ForeignKeyConstraint(ColumnCollectionConstraint): .. versionadded:: 1.0.0 """ - if hasattr(self, 'table'): + if hasattr(self, "parent"): return self.columns.keys() else: return [ -- 2.47.3