1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16: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

@@ -53,7 +53,7 @@ def DO_NOTHING(collector, field, sub_objs, using):
def force_managed(func):
@wraps(func)
def decorated(self, *args, **kwargs):
if not transaction.is_managed(using=self.using):
if transaction.get_autocommit(using=self.using):
transaction.enter_transaction_management(using=self.using, forced=True)
forced_managed = True
else: