Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rkw committed Jul 14, 2024
1 parent de0544c commit dfdd31a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion monzo_utils/lib/monzo_payments.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def get_last_salary_date(self):

return last_salary_transaction.date

last_salary_transaction = Payments.one(key='last_salary_transaction')
last_salary_transaction = Payments.one(account_id=self.account.id, key='last_salary_transaction')

if last_salary_transaction:
last_salary_transaction = Transaction.one(id=last_salary_transaction.transaction_id)
Expand Down
4 changes: 2 additions & 2 deletions monzo_utils/model/finance.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def all_finance_transactions(self):

all_transactions_hash = self.hash('all_finance_transactions', filter_expression, attr_names, attr_values, key_condition_expression, self.account.id)

all_transactions = Payments().one(key=all_transactions_hash)
all_transactions = Payments.one(account_id=self.account.id, key=all_transactions_hash)

if all_transactions is not None:
all_finance_transactions = Transaction.all(id=all_transactions.transaction_ids.split(','))
Expand Down Expand Up @@ -118,7 +118,7 @@ def all_finance_transactions(self):

all_transactions_hash = self.hash('all_finance_transactions', filter_expression, attr_names, attr_values, key_condition_expression, self.account.id)

all_transactions = Payments().one(key=all_transactions_hash)
all_transactions = Payments.one(account_id=self.account.id, key=all_transactions_hash)

if all_transactions is not None:
all_finance_transactions = Transaction.all(id=all_transactions.transaction_ids.split(','))
Expand Down
2 changes: 1 addition & 1 deletion monzo_utils/model/flex_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def older_last_payment(self):

older_last_payment_hash = self.hash('older_last_payment', filter_expression, attr_names, attr_values, key_condition_expression)

older_last_payment = Payments().one(key=older_last_payment_hash)
older_last_payment = Payments.one(account_id=self.account.id, key=older_last_payment_hash)

if older_last_payment is not None:
if older_last_payment.transaction_id:
Expand Down
4 changes: 2 additions & 2 deletions monzo_utils/model/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def last_payment(self):

last_payment_hash = self.hash('last_payment', filter_expression, attr_names, attr_values, key_condition_expression)

last_payment = Payments().one(key=last_payment_hash)
last_payment = Payments.one(account_id=self.account.id, key=last_payment_hash)

if last_payment is not None:
if last_payment.transaction_id:
Expand Down Expand Up @@ -528,7 +528,7 @@ def older_last_payment(self):

last_payment_hash = self.hash('older_last_payment', filter_expression, attr_names, attr_values, key_condition_expression)

last_payment = Payments().one(key=last_payment_hash)
last_payment = Payments.one(account_id=self.account.id, key=last_payment_hash)

if last_payment is not None:
if last_payment.transaction_id:
Expand Down

0 comments on commit dfdd31a

Please sign in to comment.