summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cramer <dcramer@gmail.com>2014-12-20 12:02:26 -0800
committerDavid Cramer <dcramer@gmail.com>2014-12-20 12:02:26 -0800
commit27f68f8659a648cc9ed3e71f690959ed8a130c5a (patch)
treedcf5e223b2b3886d292eb6ef93879b7c0794fc88
parent57554442fe3e209c135e15dda4ea45123e579e58 (diff)
Correct scoping of savepoint example
-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 5fb66ca684..66ef6d42e9 100644
--- a/docs/topics/db/transactions.txt
+++ b/docs/topics/db/transactions.txt
@@ -492,8 +492,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: