diff options
| author | Tim Graham <timograham@gmail.com> | 2018-10-25 10:17:37 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-10-25 10:17:37 -0400 |
| commit | f1d163449396f8bab6c50f4b8b54829d139feda2 (patch) | |
| tree | 8daf54d7e29f89a42e13ff25332daac68fa497e1 | |
| parent | 9b52bd6575627c0a5b1bb32e2657499312489608 (diff) | |
Removed useless check in sqlite's DatabaseWrapper._savepoint_allowed().
Obsolete since 27193aea0088b238e3ee0f0f235364a34a09265c.
| -rw-r--r-- | django/db/backends/sqlite3/base.py | 6 |
1 files changed, 1 insertions, 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: |
