mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
Deprecated transaction.commit/rollback_unless_managed.
Since "unless managed" now means "if database-level autocommit", committing or rolling back doesn't have any effect. Restored transactional integrity in a few places that relied on automatically-started transactions with a transitory API.
This commit is contained in:
@@ -62,8 +62,6 @@ def force_managed(func):
|
||||
func(self, *args, **kwargs)
|
||||
if forced_managed:
|
||||
transaction.commit(using=self.using)
|
||||
else:
|
||||
transaction.commit_unless_managed(using=self.using)
|
||||
finally:
|
||||
if forced_managed:
|
||||
transaction.leave_transaction_management(using=self.using)
|
||||
|
||||
Reference in New Issue
Block a user