set_rollback(rollback, using=None)
[source]
Setting the rollback flag to True
forces a rollback when exiting the innermost atomic block. This may be useful to trigger a rollback without raising an exception.
Setting it to False
prevents such a rollback. Before doing that, make sure you’ve rolled back the transaction to a known-good savepoint within the current atomic block! Otherwise you’re breaking atomicity and data corruption may occur.
Please login to continue.