Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rkw committed May 25, 2024
1 parent afc37b8 commit bd013d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.0 - 25/05/2024

- bugfix

## 0.0.99 - 18/05/2024

- fixed crash when processing refunds due
Expand Down
8 changes: 7 additions & 1 deletion monzo_utils/model/payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,14 @@ def older_last_payment(self):

where, params = self.get_transaction_where_condition()

sql = "select * from transaction"

if 'metadata' in self.payment_config:
for i in range(0, len(self.payment_config['metadata'])):
sql += " join transaction_metadata meta%d on transaction.id = meta%d.transaction_id" % (i+1, i+1)

transactions = Transaction.find(
f"select * from transaction where {where} order by created_at desc",
f"{sql} where {where} order by created_at desc",
params
)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup

setup(name='monzo-utils',
version='0.0.99',
version='0.0.100',
description='Monzo Utils',
author='Mark Wadham',
url='https://github.com/m4rkw/monzo-utils',
Expand Down

0 comments on commit bd013d4

Please sign in to comment.