Skip to content

Commit d9a7f6d

Browse files
committed
Fix related_name references
1 parent 5b37c85 commit d9a7f6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

thebook/bookkeeping/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _valid_year_and_month(month, year):
6060
if not _valid_year_and_month(month, year):
6161
raise ValueError("Invalid 'month' and 'year' arguments")
6262

63-
transactions = self.transaction_set.all()
63+
transactions = self.transactions.all()
6464

6565
overall_balance = (
6666
transactions.aggregate(overall_balance=Sum("amount")).get("overall_balance")

thebook/bookkeeping/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _get_bank_account_transactions_context(bank_account, *, year=None, month=Non
7979
if month is not None:
8080
month = int(month)
8181

82-
transactions = bank_account.transaction_set.select_related(
82+
transactions = bank_account.transactions.select_related(
8383
"category"
8484
).prefetch_related("documents")
8585
if year:

0 commit comments

Comments
 (0)