mirror of
https://github.com/Hopiu/django.git
synced 2026-03-25 10:20:31 +00:00
Merge pull request #3763 from dcramer/patch-2
Correct scoping of savepoint example
This commit is contained in:
commit
653a3a4e18
1 changed files with 1 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue