Django nested transactions – “with transaction.atomic()”
Yes, it will. Regardless of nesting, if an atomic block is exited by an exception it will roll back: If the block of code is successfully completed, the changes are committed to the database. If there is an exception, the changes are rolled back. Note also that an exception in an outer block will cause … Read more