KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a view function: @transaction.commit_manually def xyz(request): if ABC: success = something() if success: status = "success" transaction.commit() else: status = "dataerrors" transaction.rollback() else: status = "uploadproblem" transaction.rollback() return render(request, "template.html", { 'status': status, }) I believe every code path ends the transaction one way or another. But Django seems to be complaining that it doesn't. Any ideas? Django Version: 1.3 Exception Type: TransactionManagementError Exception Value: Transaction managed block ended with pending COMMIT/ROLLBACK EDIT: No other exceptions are being thrown to alter the code path.
Tags (comma-separated)
Save Edits
Cancel