File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,7 @@ def insert_movie_with_callback():
3434 runtime = 140 ,
3535 genres = ["Horror" , "Comedy" ]
3636 )
37-
38- # Registers the callback to run only after the transaction commits
37+
3938 transaction .on_commit (get_horror_comedies )
4039# end-callback
4140
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ Run Callbacks After a Transaction
106106---------------------------------
107107
108108If you want to perform certain actions only if a transaction successfully
109- completes, you can use the ``on_commit()`` method. This method allows you to
109+ completes, you can use the ``transaction. on_commit()`` method. This method allows you to
110110register callbacks that run after a transaction is committed to the
111111database. Pass a function, or any callable object, as an argument to
112112``on_commit()``.
You can’t perform that action at this time.
0 commit comments