diff options
author | Brad Allen <bradallen137@gmail.com> | 2010-03-12 13:09:31 -0600 |
---|---|---|
committer | Brad Allen <bradallen137@gmail.com> | 2010-03-12 13:09:31 -0600 |
commit | 5ca404af22ad45a9519c26f54345416c56588974 (patch) | |
tree | 86fc65b75538156dc25e1ac35c5e79f20221a90e /lib/sqlalchemy/sql | |
parent | 8b8073af0dc39916f5505816c1d8bbf63a90897d (diff) | |
parent | 1b169548642b4ced5b25510d35fdd28af0c06c7e (diff) | |
download | sqlalchemy-5ca404af22ad45a9519c26f54345416c56588974.tar.gz |
Merged latest changes from the mainline (default branch)
Diffstat (limited to 'lib/sqlalchemy/sql')
-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()) |