summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/unitofwork.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-04-16 18:35:49 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-04-16 18:35:49 -0400
commitd72b327786d663b3954df345c6afc30e8e6f91fc (patch)
treed0619c16728b234c11f71cba2d9d8909877b4db0 /lib/sqlalchemy/orm/unitofwork.py
parent3bd09e291b8c9920b043f41438c636bf5bbaeef3 (diff)
downloadsqlalchemy-d72b327786d663b3954df345c6afc30e8e6f91fc.tar.gz
- don't switch a delete to a non-delete during rowswitch, fixes [ticket:1772]
Diffstat (limited to 'lib/sqlalchemy/orm/unitofwork.py')
-rw-r--r--lib/sqlalchemy/orm/unitofwork.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/unitofwork.py b/lib/sqlalchemy/orm/unitofwork.py
index 756389fa7..cbf45039e 100644
--- a/lib/sqlalchemy/orm/unitofwork.py
+++ b/lib/sqlalchemy/orm/unitofwork.py
@@ -130,7 +130,9 @@ class UOWTransaction(object):
def remove_state_actions(self, state):
"""remove pending actions for a state from the uowtransaction."""
- self.states[state] = (False, True)
+ isdelete = self.states[state][0]
+
+ self.states[state] = (isdelete, True)
def get_attribute_history(self, state, key, passive=True):
"""facade to attributes.get_state_history(), including caching of results."""