From 5a54e4b76a5d2d59a144c7702da5cc1acc2d8e7e Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 21 Sep 2021 14:19:24 +0200 Subject: [PATCH] fix transaction query --- firefly/budgets.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/firefly/budgets.py b/firefly/budgets.py index 32e76a4..c189b31 100644 --- a/firefly/budgets.py +++ b/firefly/budgets.py @@ -46,11 +46,13 @@ def _get_current_limit(budget_id): def _get_current_transactions(budget_id): limit_id = _get_current_limit(budget_id).get('id') - transactions_json = requests.get( - host + "/api/v1/budgets/limits/{}/transactions".format( + transactions_req = requests.get( + host + "/api/v1/budgets/{}/limits/{}/transactions".format( + budget_id, limit_id ), headers=header - ).json() + ) + transactions_json = transactions_req.json() transactions = transactions_json.get('data') while 'next' in transactions_json: transactions_json = requests.get(