Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransactionManagementError with ATOMIC_REQUESTS enabled #11

Closed
roelwivion opened this issue May 14, 2014 · 1 comment
Closed

TransactionManagementError with ATOMIC_REQUESTS enabled #11

roelwivion opened this issue May 14, 2014 · 1 comment

Comments

@roelwivion
Copy link

While using your app I noticed TransactionManagementError errors occurs when logging in with the ATOMIC_REQUESTS setting set to True. (Python: 2.7.3, Django: 1.6.4)

The traceback "refers to /user_sessions/backends/db", line 77 "with transaction.commit_on_success(using)". I believe this line should be replaced with atomic transaction.atomic(using):.
According to the Django docs:

"Starting with Django 1.6, atomic() is the only supported API for defining a transaction. Unlike the deprecated APIs, it’s nestable and always guarantees atomicity"

Thank you for this project, it's really handy.

@Bouke Bouke closed this as completed in 92e886f May 15, 2014
@Bouke
Copy link
Collaborator

Bouke commented May 15, 2014

Hi @roelwivion, thanks for the report. I had some problems replicating your issue at first, but I finally managed to reproduce it. However I cannot reproduce the error in a unit test, so hopefully it will continue working in the future. To make sure it does, I enabled atomic requests in the example app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants