Hi all -- I just upgraded one of my projects to Django 1.8 from 1.7.7 and in a view function where we're doing manual transaction management (Postgres) I'm now getting the error in the subject line.
Basic gist of the code involved:
def foo(request):
try:
transaction.set_autocommit(False)
... do stuff involving multiple database actions ...
except (DatabaseError, Exception) as e:
transaction.rollback()
This worked fine in 1.7.7 so I'm not sure what I need to change to get it working with 1.8.
I did read the docs on the atomic() functionality and took a few runs at that but just wound up with different errors, so I thought I'd start with what I originally had and see what I need to change to make Django 1.8 happy. But if using the atomic() stuff is preferable any tips around that would also be appreciated; I can post the errors I'm getting when trying things that way as needed.
Appreciate any ideas anyone has. Thanks.