fix transaction query
This commit is contained in:
parent
cfcf23a84d
commit
5a54e4b76a
1 changed files with 5 additions and 3 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue