diff options
| author | Jeremy Dunck <jdunck@gmail.com> | 2007-03-23 16:35:57 +0000 |
|---|---|---|
| committer | Jeremy Dunck <jdunck@gmail.com> | 2007-03-23 16:35:57 +0000 |
| commit | fa3ed6e1341f7c8b468e2267b3fafddeb58cdac2 (patch) | |
| tree | 6d8bf65854f8431355e2d91cbc61a37ab6f23d9a /django/db/backends/postgresql_psycopg2 | |
| parent | 8b279b63bef5c1348cc27c50633fc2d5ef09d7c1 (diff) | |
gis: Merged revisions 4669-4785 via svnmerge from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@4786 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/postgresql_psycopg2')
| -rw-r--r-- | django/db/backends/postgresql_psycopg2/base.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 9b319ad3c7..e4724e46fb 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -60,10 +60,11 @@ class DatabaseWrapper(local): return cursor def _commit(self): - return self.connection.commit() + if self.connection is not None: + return self.connection.commit() def _rollback(self): - if self.connection: + if self.connection is not None: return self.connection.rollback() def close(self): |
