summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/state.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-09-03 11:11:25 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-09-03 11:11:25 -0400
commit7699bd733bc109e1c39f764684c88dbaed63fe4a (patch)
tree5604e14e41d315b133b1a5fb72f40041415d1858 /lib/sqlalchemy/orm/state.py
parent606135dd989f3f9b057559128a185e9f7e5364f0 (diff)
downloadsqlalchemy-7699bd733bc109e1c39f764684c88dbaed63fe4a.tar.gz
- reduce some callcounts within the new events
Diffstat (limited to 'lib/sqlalchemy/orm/state.py')
-rw-r--r--lib/sqlalchemy/orm/state.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py
index 9f1190339..b648ffa3b 100644
--- a/lib/sqlalchemy/orm/state.py
+++ b/lib/sqlalchemy/orm/state.py
@@ -318,8 +318,8 @@ class InstanceState(interfaces.InspectionAttr):
for state in states:
deleted = state._deleted
- persistent = state.key is not None and not deleted
pending = state.key is None
+ persistent = not pending and not deleted
state.session_id = None