From f1d163449396f8bab6c50f4b8b54829d139feda2 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 25 Oct 2018 10:17:37 -0400 Subject: [PATCH] Removed useless check in sqlite's DatabaseWrapper._savepoint_allowed(). Obsolete since 27193aea0088b238e3ee0f0f235364a34a09265c. --- django/db/backends/sqlite3/base.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index d6bb061c30..846bd8a6f3 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -227,16 +227,12 @@ class DatabaseWrapper(BaseDatabaseWrapper): BaseDatabaseWrapper.close(self) def _savepoint_allowed(self): - # Two conditions are required here: - # - A sufficiently recent version of SQLite to support savepoints, - # - Being in a transaction, which can only happen inside 'atomic'. - # When 'isolation_level' is not None, sqlite3 commits before each # savepoint; it's a bug. When it is None, savepoints don't make sense # because autocommit is enabled. The only exception is inside 'atomic' # blocks. To work around that bug, on SQLite, 'atomic' starts a # transaction explicitly rather than simply disable autocommit. - return self.features.uses_savepoints and self.in_atomic_block + return self.in_atomic_block def _set_autocommit(self, autocommit): if autocommit: