Please sign in to comment.
Fix `save` in `after_create_commit` won't invoke extra `after_create_…
…commit` Since a record is already persisted in `after_create_commit`, so `save` should invoke only `after_update_commit`. This bug is caused by depending on `@_start_transaction_state` for rollback to consider whether it was `new_record` before being committed. If after commit callbacks caused another commit, the state before last commit is no longer `new_record`. Fixes #32831. Closes #18367. Closes #31106.
- Loading branch information...
Showing with 25 additions and 10 deletions.