]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- use self.parent, not table here as there's an attributeerror
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Nov 2014 04:33:47 +0000 (23:33 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Nov 2014 04:33:47 +0000 (23:33 -0500)
trap for self.table that behaves differently in py3k

lib/sqlalchemy/sql/schema.py

index 8b2eb12f0cd52077b281b3a224279cb2901d1dca..4093d7115b95c556212ccdbd963a208564f57fb2 100644 (file)
@@ -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 [