From e4e6bf0712fdd774e73bea7aadf799656544b513 Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Tue, 28 Nov 2006 15:48:39 +0000 Subject: [multi-db] For all backends: commit only when a connection exists. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4127 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/sqlite3/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'django/db/backends/sqlite3') diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index e6aff2d847..2d42700e63 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -56,7 +56,8 @@ class DatabaseWrapper(local): return cursor def _commit(self): - self.connection.commit() + if self.connection: + self.connection.commit() def _rollback(self): if self.connection: -- cgit v1.3