diff options
Diffstat (limited to 'django/db/backends/postgresql/base.py')
| -rw-r--r-- | django/db/backends/postgresql/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 774b52a1d6..cc6686ed81 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -43,7 +43,8 @@ class DatabaseWrapper(object): return cursor def _commit(self): - return self.connection.commit() + if self.connection: + return self.connection.commit() def _rollback(self): if self.connection: |
