From: Mike Bayer Date: Wed, 26 Nov 2014 04:33:47 +0000 (-0500) Subject: - use self.parent, not table here as there's an attributeerror X-Git-Tag: rel_1_0_0~19^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79c0aa6b7320f94399634d02997faacbb6ced1d7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - use self.parent, not table here as there's an attributeerror trap for self.table that behaves differently in py3k --- 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 [