# HG changeset patch
# User Brodie Rao <brodie@bitheap.org>
# Date 1305680869 25200
# Branch releases/1.3.X
# Node ID 20e21be6d90c3376c59bca6dbf5e01690a417289
# Parent 449a8f9da389a7a6642d8bb2c98825df8a02c90e
psycopg2: properly restore autocommit mode when leaving transaction management
diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py
a
|
b
|
class DatabaseWrapper(BaseDatabaseWrappe
|
177 | 177 | If the normal operating mode is "autocommit", switch back to that when |
178 | 178 | leaving transaction management. |
179 | 179 | """ |
180 | | if self.features.uses_autocommit and not managed and self.isolation_level: |
| 180 | if self.features.uses_autocommit and self.isolation_level: |
181 | 181 | self._set_isolation_level(0) |
182 | 182 | |
183 | 183 | def _set_isolation_level(self, level): |