1
0
mirror of https://github.com/django/django.git synced 2025-04-15 12:54:38 +00:00

[1.7.x] Corrected scoping of savepoint example

Backport of 27f68f8659a648cc9ed3e71f690959ed8a130c5a from master
This commit is contained in:
David Cramer 2014-12-20 12:02:26 -08:00 committed by Tim Graham
parent 1ad5deedd4
commit 66e9154399

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: