KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm a bit confused about how I should handle transactions in a particular situation. I've got some code that boils down to this: from django.db import transaction @transaction.commit_on_success def process_post(): #do stuff with database for reply in post_replies: process_post_reply(reply) @transaction.commit_on_success def process_post_reply(reply): #do stuff with database I want to know what happens if a process_post_reply() fails. How does commit_on_success handle being nested? Will it understand to commit each process_post_reply() or if one fails the whole process_post() rolls back?
Tags (comma-separated)
Save Edits
Cancel