diff options
author | Devi <asldevi@gmail.com> | 2013-06-19 16:03:23 +0530 |
---|---|---|
committer | Devi <asldevi@gmail.com> | 2013-06-19 16:03:23 +0530 |
commit | 27d99728293f066d4ad2fc61775454d4d4b71b33 (patch) | |
tree | 99a54eb1d50de3f40e77210546fc76684e8fabc4 /lib/sqlalchemy/ext/mutable.py | |
parent | 8c555f24b197832b9944f25d47d5989aa942bdea (diff) | |
download | sqlalchemy-27d99728293f066d4ad2fc61775454d4d4b71b33.tar.gz |
check if compostite_class is of class type
before checking if it is a subclass of `MutableComposite`
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 ca27f172f..f503ad6d4 100644 --- a/lib/sqlalchemy/ext/mutable.py +++ b/lib/sqlalchemy/ext/mutable.py @@ -588,9 +588,10 @@ class MutableComposite(MutableBase): setattr(parent, attr_name, value) def _setup_composite_listener(): + import types def _listen_for_type(mapper, class_): for prop in mapper.iterate_properties: - if (hasattr(prop, 'composite_class') and + if (hasattr(prop, 'composite_class') and (type(prop.composite_class) is types.ClassType) and issubclass(prop.composite_class, MutableComposite)): prop.composite_class._listen_on_attribute( getattr(class_, prop.key), False, class_) |