Merge pull request #3763 from dcramer/patch-2

Correct scoping of savepoint example
This commit is contained in:
Aymeric Augustin 2014-12-21 15:19:29 +01:00
commit 653a3a4e18
1 changed files with 1 additions and 1 deletions

View File

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