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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user