#26323: TransactionManagementError is raised when autocommit is false
-------------------------------+--------------------------------------
     Reporter:  tltx           |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Uncategorized  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by tltx):

 Replying to [comment:5 aaugustin]:
 > Can you check the note titled
 [https://docs.djangoproject.com/en/1.9/topics/db/transactions
 /#controlling-transactions-explicitly Avoid catching exceptions inside
 atomic]?

 I'm not in a atomic block when handling the exception, no atomic blocks
 are used in the code. But deep down in Django atomic blocks are used
 anyway and thats where `need_rollback` is set. e.g. in `save_base()`
 /Users/torel/work/djangoproject/django/django/db/models/base.py:725

 > Can you share a code sample?
 I can't share the actual code and it would not be very useful anyway I
 think. I have to write a test somehow, could you point me to a test I
 could use to get started?

--
Ticket URL: <https://code.djangoproject.com/ticket/26323#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.fa049c3d116fe2faceb56074ceea3385%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to