diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-05-02 03:33:18 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-05-02 03:33:18 +0000 |
| commit | 3c161737207b6af154923e4db9a0a1d67970cddf (patch) | |
| tree | 02b0f81871dc26d84353e74832bce9685327c61d /lib/sqlalchemy/sql | |
| parent | f247bb20007190ae7aa89929c02c03317b1e6876 (diff) | |
| parent | 45a334e38c1baab34d3195c899cb9ca617fb52a7 (diff) | |
| download | sqlalchemy-3c161737207b6af154923e4db9a0a1d67970cddf.tar.gz | |
Merge "Handle non-string, non column expression in index for deferred attach"
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/schema.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index eddd62d65..b7ac16b0a 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -2807,7 +2807,6 @@ class ColumnCollectionMixin(object): cols_w_table = [c for c in col_objs if isinstance(c.table, Table)] cols_wo_table = set(col_objs).difference(cols_w_table) - if cols_wo_table: # feature #3341 - place event listeners for Column objects # such that when all those cols are attached, we autoattach. @@ -2815,7 +2814,9 @@ class ColumnCollectionMixin(object): # issue #3411 - don't do the per-column auto-attach if some of the # columns are specified as strings. - has_string_cols = set(self._pending_colargs).difference(col_objs) + has_string_cols = set( + c for c in self._pending_colargs if c is not None + ).difference(col_objs) if not has_string_cols: def _col_attached(column, table): |
