fix transaction query

This commit is contained in:
chris 2021-09-21 14:19:24 +02:00
parent cfcf23a84d
commit 5a54e4b76a

View file

@ -46,11 +46,13 @@ def _get_current_limit(budget_id):
def _get_current_transactions(budget_id): def _get_current_transactions(budget_id):
limit_id = _get_current_limit(budget_id).get('id') limit_id = _get_current_limit(budget_id).get('id')
transactions_json = requests.get( transactions_req = requests.get(
host + "/api/v1/budgets/limits/{}/transactions".format( host + "/api/v1/budgets/{}/limits/{}/transactions".format(
budget_id,
limit_id limit_id
), headers=header ), headers=header
).json() )
transactions_json = transactions_req.json()
transactions = transactions_json.get('data') transactions = transactions_json.get('data')
while 'next' in transactions_json: while 'next' in transactions_json:
transactions_json = requests.get( transactions_json = requests.get(