summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/unitofwork.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-04-23 11:45:06 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-04-23 11:45:06 -0400
commitff0fb31bf205a82c4af8781ac9afc96586a67d66 (patch)
tree95d3d6164cdfe6104cdde2cb94daab11ec4da17c /lib/sqlalchemy/orm/unitofwork.py
parent713a4e19fa6c4397191dd7311152c6c69c37535e (diff)
downloadsqlalchemy-ff0fb31bf205a82c4af8781ac9afc96586a67d66.tar.gz
- merge attribute flag overhaul for [ticket:2358]
Diffstat (limited to 'lib/sqlalchemy/orm/unitofwork.py')
-rw-r--r--lib/sqlalchemy/orm/unitofwork.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py
index 8fc5f139d..3523e7d06 100644
--- a/lib/sqlalchemy/orm/unitofwork.py
+++ b/lib/sqlalchemy/orm/unitofwork.py
@@ -166,8 +166,9 @@ class UOWTransaction(object):
history, state_history, cached_passive = self.attributes[hashkey]
# if the cached lookup was "passive" and now
# we want non-passive, do a non-passive lookup and re-cache
- if cached_passive is not attributes.PASSIVE_OFF \
- and passive is attributes.PASSIVE_OFF:
+
+ if not cached_passive & attributes.SQL_OK \
+ and passive & attributes.SQL_OK:
impl = state.manager[key].impl
history = impl.get_history(state, state.dict,
attributes.PASSIVE_OFF)