summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cramer <dcramer@gmail.com>2014-12-20 12:02:26 -0800
committerTim Graham <timograham@gmail.com>2014-12-22 07:51:09 -0500
commit66e91543998bdece82d9c154dced1a62824e228b (patch)
treeb6e6c941f23597fd0f175b403091e95e1312e8ed
parent1ad5deedd4c51729be680e3c2730c2ef5ab4f831 (diff)
[1.7.x] Corrected scoping of savepoint example
Backport of 27f68f8659a648cc9ed3e71f690959ed8a130c5a from master
-rw-r--r--docs/topics/db/transactions.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/db/transactions.txt b/docs/topics/db/transactions.txt
index 288ecc4ef6..a633d58654 100644
--- a/docs/topics/db/transactions.txt
+++ b/docs/topics/db/transactions.txt
@@ -522,8 +522,8 @@ you can roll back the single offending operation, rather than the entire
transaction. For example::
a.save() # Succeeds, and never undone by savepoint rollback
+ sid = transaction.savepoint()
try:
- sid = transaction.savepoint()
b.save() # Could throw exception
transaction.savepoint_commit(sid)
except IntegrityError: