Django Exception Handling Cancels Non-atomic Transaction Mode
Best described by example. Consider the following code (Django 1.9) View: @transaction.non_atomic_requests def error_generating_view(request): modelA = ModelA(...) modelA.s
Solution 1:
Use transaction.atomic
decorator, not transaction.non_atomic_requests
- by using transaction.non_atomic_requests
you're telling Django, that this request should NOT be wrapped in transaction (every change is auto-commited to the database)
Post a Comment for "Django Exception Handling Cancels Non-atomic Transaction Mode"