0

Transactions are working correctly in production environment (django 1.9 + Ubuntu + PosgreSQL) but they have no effect in development environment with DEBUG = True.

E.g.

with transaction.atomic()
   do_stuff()
   raise Exception()

Changes made to DB by do_stuff() are supposed to be rolled back because of the exception. This happens in production environment as expected.

In dev environment changes made by do_stuff are not rolled back. I can't find any explanation of this behaviour in django docs.

Why is this happening?

user1387219
  • 465
  • 4
  • 18
  • Which is it: "thay have no effect in development environment" or "are still there in dev environment but not in production environment"? – Alper Jun 12 '18 at 10:20
  • I think you need to add more detail about how to reproduce the problem. There's nothing in the pseudo code you have shown that would explain that behaviour. – Alasdair Jun 12 '18 at 10:25

0 Answers0