        # transaction now contains a.save()
  
        sid = transaction.savepoint()
  
        b.save()
        # transaction now contains a.save() and b.save()
  
        if want_to_keep_b:
            transaction.savepoint_commit(sid)
            # open transaction still contains a.save() and b.save()
        else:
 
</s> remove       if want_to_keep_b:
          transaction.savepoint_commit(sid)
          # open transaction still contains a.save() and b.save()
      else:
          transaction.savepoint_rollback(sid)
          # open transaction now contains only a.save()
 </s> add         if want_to_keep_b:
            transaction.savepoint_commit(sid)
            # open transaction still contains a.save() and b.save()
        else:
            transaction.savepoint_rollback(sid)
            # open transaction now contains only a.save() </s> remove       sid = transaction.savepoint()
 </s> add         sid = transaction.savepoint() </s> remove       a.save()
      # transaction now contains a.save()
 </s> add         a.save()
        # transaction now contains a.save() </s> remove .. versionchanged:: 1.5

 </s> add  </s> remove Django used to remove the ``cleaned_data`` attribute entirely if there were
any errors in the form. Since version 1.5, ``cleaned_data`` is present even if
the form doesn't validate, but it contains only field values that did
validate.
 </s> add     Django used to remove the ``cleaned_data`` attribute entirely if there were
    any errors in the form. Since version 1.5, ``cleaned_data`` is present even if
    the form doesn't validate, but it contains only field values that did
    validate.
        b.save()
        # transaction now contains a.save() and b.save()
        # transaction now contains a.save()
  
        sid = transaction.savepoint()
  
        b.save()
        # transaction now contains a.save() and b.save()
        b.save()
        # transaction now contains a.save() and b.save()
  
        if want_to_keep_b:
            transaction.savepoint_commit(sid)
            # open transaction still contains a.save() and b.save()
        else:
keep keep keep keep replace replace keep keep keep keep keep
 Adapted uses of versionchanged/versionadded to the new form.

Refs #20104. 
docs/topics/db/transactions.txt