Skip to content

Commit 7a1da45

Browse files
Merge branch 'webb/django-sql-commit' into webb/django-sql-rollback
2 parents 9bec32a + b0b9bd7 commit 7a1da45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integrations/django/myapp/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ def postgres_insert_orm_no_autocommit(request, *args, **kwargs):
256256
)
257257
transaction.commit(using="postgres")
258258
except Exception:
259+
transaction.rollback(using="postgres")
259260
transaction.set_autocommit(True, using="postgres")
260-
transaction.rollback()
261261
raise
262262

263263
transaction.set_autocommit(True, using="postgres")

0 commit comments

Comments
 (0)