From 5078660ce19bbb15f83c9b4dec8442b257aee96c Mon Sep 17 00:00:00 2001 From: Linus E <75929322+Rripped@users.noreply.github.com> Date: Sun, 17 Apr 2022 11:21:49 +0200 Subject: [PATCH] fixed dict errors --- telegram_bot/api_handling/api_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram_bot/api_handling/api_handler.py b/telegram_bot/api_handling/api_handler.py index b1ce853..fa4a37e 100644 --- a/telegram_bot/api_handling/api_handler.py +++ b/telegram_bot/api_handling/api_handler.py @@ -260,7 +260,7 @@ class API_Handler: req = s.get(self.db_adress + "/transactions", headers=headers) if req.status_code == 200: - transactions_dict = dict(req.json()["data"]) + transactions_dict = req.json()["data"] return transactions_dict else: return self.get_user_transactions(user_id, max_retries-1) @@ -303,7 +303,7 @@ class API_Handler: headers = {'Authorization': 'Bearer ' + self.token + ":" + str(user_id)} req = s.get(self.db_adress + "/portfolio", headers=headers) if req.status_code == 200: - portfolio_dict = dict(req.json()["data"]) + portfolio_dict = req.json()["data"] return portfolio_dict else: return self.get_user_portfolio(user_id, max_retries-1)