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

Django 1.6 - TransactionManagementError #53

Open
Blackeagle52 opened this issue Mar 14, 2014 · 0 comments
Open

Django 1.6 - TransactionManagementError #53

Blackeagle52 opened this issue Mar 14, 2014 · 0 comments

Comments

@Blackeagle52
Copy link

The following code will raise a TransactionManagementError when;
a handler in a transition raises an exception, and the make_transisition is in a transaction.atomic

# model_methods.py: line 205-209
except Exception, e:
    if _state_log_model:
        # main reason, this will raise error, you won't see 'e'
        transition_log.make_transition('fail')
    raise

Cause: trying to save something in database after an exception, which isn't 'protected' anymore by transaction block.

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

No branches or pull requests

1 participant