1
0
mirror of https://github.com/django/django.git synced 2025-10-29 08:36:09 +00:00

Deprecated transaction.is_managed().

It's synchronized with the autocommit flag.
This commit is contained in:
Aymeric Augustin
2013-03-04 15:24:01 +01:00
parent ba5138b1c0
commit 3bdc7a6a70
7 changed files with 23 additions and 30 deletions

View File

@@ -23,7 +23,7 @@ class TransactionMiddleware(object):
def process_response(self, request, response):
"""Commits and leaves transaction management."""
if transaction.is_managed():
if not transaction.get_autocommit():
if transaction.is_dirty():
# Note: it is possible that the commit fails. If the reason is
# closed connection or some similar reason, then there is