diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-11 12:07:08 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-11 12:07:08 -0500 |
commit | 86df449c2b724341f3d3f322ad71252b287e1f12 (patch) | |
tree | 93abff72f69eb43265b586d3bc65b3a71267c6e5 /lib/sqlalchemy/sql/util.py | |
parent | ea4916001d5023100549d5dcc07ef51657d079fc (diff) | |
download | sqlalchemy-86df449c2b724341f3d3f322ad71252b287e1f12.tar.gz |
- fixed internal error which would occur if calling has()
or similar complex expression on a single-table inheritance
relation(). [ticket:1731]
Diffstat (limited to 'lib/sqlalchemy/sql/util.py')
-rw-r--r-- | lib/sqlalchemy/sql/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index 43673eaec..1b90a457f 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -276,7 +276,9 @@ def _deep_annotate(element, annotations, exclude=None): def clone(elem): # check if element is present in the exclude list. # take into account proxying relationships. - if exclude and elem.proxy_set.intersection(exclude): + if exclude and \ + hasattr(elem, 'proxy_set') and \ + elem.proxy_set.intersection(exclude): elem = elem._clone() elif annotations != elem._annotations: elem = elem._annotate(annotations.copy()) |