[1.6.x] Corrected scoping of savepoint example

Backport of 27f68f8659 from master
This commit is contained in:
David Cramer 2014-12-20 12:02:26 -08:00 committed by Tim Graham
parent 0e3626260d
commit d237aaa929
1 changed files with 1 additions and 1 deletions

View File

@ -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: