diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-11-28 15:48:39 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-11-28 15:48:39 +0000 |
| commit | e4e6bf0712fdd774e73bea7aadf799656544b513 (patch) | |
| tree | ce2a3071b4d143b984b7564fffdb888428621724 /django/db/backends/sqlite3/base.py | |
| parent | 7e6d1365ba3c912b0582e291a5ae7d345f64abe3 (diff) | |
[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
Diffstat (limited to 'django/db/backends/sqlite3/base.py')
| -rw-r--r-- | django/db/backends/sqlite3/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |
