1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Correct scoping of savepoint example

This commit is contained in:
David Cramer 2014-12-20 12:02:26 -08:00
parent 57554442fe
commit 27f68f8659

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: