Django Database Transactions: The Bugs You Don’t Know You Have

atomic() prevents partial saves. It doesn’t prevent race conditions.