From 746cded010c7ba3e2bf2df4cde32dcc9b75cb0d3 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 23 Mar 2014 23:09:26 +0100 Subject: [1.6.x] Fixed #22321 -- Wrapped exceptions in _set_autocommit. Refs #21202. Backport of 3becac84 from master --- django/db/backends/sqlite3/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'django/db/backends/sqlite3/base.py') diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 96b03149d7..a219178570 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -387,7 +387,8 @@ class DatabaseWrapper(BaseDatabaseWrapper): level = '' # 'isolation_level' is a misleading API. # SQLite always runs at the SERIALIZABLE isolation level. - self.connection.isolation_level = level + with self.wrap_database_errors: + self.connection.isolation_level = level def check_constraints(self, table_names=None): """ -- cgit v1.3