diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-04-04 09:06:13 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-04-04 09:06:13 -0400 |
commit | d13734add349ec6763cce8b194806c5afe988000 (patch) | |
tree | f2083413bc8332953169dd38b3ec1f99ad21d389 /lib/sqlalchemy/ext/mutable.py | |
parent | 9609f5ffb52ce8a4969059e299773ac7176dbb0d (diff) | |
download | sqlalchemy-d13734add349ec6763cce8b194806c5afe988000.tar.gz |
Ensure we check that SQL expression has an .info attribute
Fixed regression released in 1.1.8 due to :ticket:`3950` where the
deeper search for information about column types in the case of a
"schema type" or a :class:`.TypeDecorator` would produce an attribute
error if the mapping also contained a :obj:`.column_property`.
Change-Id: I38254834d3d79c9b339289a8163eb4789ec4c931
Fixes: #3956
Diffstat (limited to 'lib/sqlalchemy/ext/mutable.py')
-rw-r--r-- | lib/sqlalchemy/ext/mutable.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/ext/mutable.py b/lib/sqlalchemy/ext/mutable.py index a133f950d..e721397b3 100644 --- a/lib/sqlalchemy/ext/mutable.py +++ b/lib/sqlalchemy/ext/mutable.py @@ -600,7 +600,8 @@ class Mutable(MutableBase): for prop in mapper.column_attrs: if ( schema_event_check and - prop.columns[0].info.get('_ext_mutable_orig_type') + hasattr(prop.expression, 'info') and + prop.expression.info.get('_ext_mutable_orig_type') is sqltype ) or ( prop.columns[0].type is sqltype |