1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[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

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: