Skip to content

Commit 91b8091

Browse files
committed
Update transaction.py
1 parent e747973 commit 91b8091

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

django_mongodb_backend/transaction.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def __init__(self, using):
2121

2222
def __enter__(self):
2323
connection = get_connection(self.using)
24+
connection.ensure_connection()
2425
if connection.in_atomic_block_mongo:
2526
# Track the number of nested atomic() calls.
2627
connection.nested_atomics += 1

0 commit comments

Comments
 (0)