Skip to content

Commit

Permalink
Update django_spanner/base.py
Browse files Browse the repository at this point in the history
Co-authored-by: Knut Olav Løite <koloite@gmail.com>
  • Loading branch information
ankiaga and olavloite committed Apr 23, 2024
1 parent 1ac058d commit 69dcfb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_spanner/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,4 +223,6 @@ def _start_transaction_under_autocommit(self):
self.connection.cursor().execute("BEGIN")
else:
# This won't start a transaction and was a bug in Spanner Django 3.2 version.
# Set ALLOW_TRANSACTIONS_IN_AUTO_COMMIT = True in your settings.py file to enable
# transactions in autocommit mode for Django 3.2.
self.connection.cursor().execute("SELECT 1")

0 comments on commit 69dcfb3

Please sign in to comment.