diff options
| author | Jason Kirtland <jek@discorporate.us> | 2008-08-15 22:59:13 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2008-08-15 22:59:13 +0000 |
| commit | 4556f4b3dfcb9d8e443042f6d61204e01c7086df (patch) | |
| tree | 2dc8479df682e471f0b013eb1a064895025313a2 | |
| parent | cc87685c93dd93749f0f4b17707a428a85ddf299 (diff) | |
| download | sqlalchemy-4556f4b3dfcb9d8e443042f6d61204e01c7086df.tar.gz | |
- Don't choke when instrumenting a class with an old-style mixin. [ticket:1078]
| -rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 9ebe9f79f..7a001f18d 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -16,6 +16,7 @@ An example of full customization is in /examples/custom_attributes. import operator from operator import attrgetter, itemgetter +import types import weakref from sqlalchemy import util @@ -1083,6 +1084,8 @@ class ClassManager(dict): self.install_descriptor(key, inst) self[key] = inst for cls in self.class_.__subclasses__(): + if isinstance(cls, types.ClassType): + continue manager = manager_of_class(cls) if manager is None: manager = create_manager_for_cls(cls) @@ -1101,6 +1104,8 @@ class ClassManager(dict): if key in self.mutable_attributes: self.mutable_attributes.remove(key) for cls in self.class_.__subclasses__(): + if isinstance(cls, types.ClassType): + continue manager = manager_of_class(cls) if manager is None: manager = create_manager_for_cls(cls) |
