Ticket #10744: cleanup-transaction-state-on-exit.diff
File cleanup-transaction-state-on-exit.diff, 698 bytes (added by , 16 years ago) |
---|
-
django/db/transaction.py
75 75 if dirty.get(thread_ident, False): 76 76 rollback() 77 77 raise TransactionManagementError("Transaction managed block ended with pending COMMIT/ROLLBACK") 78 dirty[thread_ident] = False 78 if thread_ident in state and len(state[thread_ident]) == 0: 79 del state[thread_ident] 80 if thread_ident in dirty: 81 del dirty[thread_ident] 82 if thread_ident in savepoint_state: 83 del savepoint_state[thread_ident] 79 84 80 85 def is_dirty(): 81 86 """