Skip to content

Commit 90d24a8

Browse files
committed
fix
1 parent 4d0fdb3 commit 90d24a8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

source/includes/interact-data/transactions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

source/interact-data/transactions.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Run Callbacks After a Transaction
106106
---------------------------------
107107

108108
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
110110
register callbacks that run after a transaction is committed to the
111111
database. Pass a function, or any callable object, as an argument to
112112
``on_commit()``.

0 commit comments

Comments
 (0)