Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Made transaction management work even before the first SQL query.

Thanks Florian again.
  • Loading branch information...
commit 09ba70f9f1844680ac0e0b3a7c38ff7113cbdb02 1 parent 7c46c8d
@aaugustin aaugustin authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/db/backends/__init__.py
View
4 django/db/backends/__init__.py
@@ -269,6 +269,8 @@ def enter_transaction_management(self, managed=True, forced=False):
"""
self.validate_no_atomic_block()
+ self.ensure_connection()
+
self.transaction_state.append(managed)
if not managed and self.is_dirty() and not forced:
@@ -286,6 +288,8 @@ def leave_transaction_management(self):
"""
self.validate_no_atomic_block()
+ self.ensure_connection()
+
if self.transaction_state:
del self.transaction_state[-1]
else:
Please sign in to comment.
Something went wrong with that request. Please try again.