summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/mutable.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-04-04 09:06:13 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-04-04 09:06:13 -0400
commitd13734add349ec6763cce8b194806c5afe988000 (patch)
treef2083413bc8332953169dd38b3ec1f99ad21d389 /lib/sqlalchemy/ext/mutable.py
parent9609f5ffb52ce8a4969059e299773ac7176dbb0d (diff)
downloadsqlalchemy-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.py3
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