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():
34
34
runtime = 140 ,
35
35
genres = ["Horror" , "Comedy" ]
36
36
)
37
-
38
- # Registers the callback to run only after the transaction commits
37
+
39
38
transaction .on_commit (get_horror_comedies )
40
39
# end-callback
41
40
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ Run Callbacks After a Transaction
106
106
---------------------------------
107
107
108
108
If 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
110
110
register callbacks that run after a transaction is committed to the
111
111
database. Pass a function, or any callable object, as an argument to
112
112
``on_commit()``.
You can’t perform that action at this time.
0 commit comments