Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. with transaction.atomic():
  2.  
  3. do something like subtract stock
  4. log stuff in DB so that we can later investigate what went wrong
  5. if something goes wrong: # this line of code may reside in a function nested deep
  6. raise
  7. do more to finalize the order
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement