From e45315ceb33d722ac9e637a9e70aa70d0812e97e Mon Sep 17 00:00:00 2001 From: Artem Veremey Date: Fri, 26 Feb 2021 21:52:29 -0800 Subject: [PATCH] Fix handling of empty Company and Price Range in the Fidelity Orders --- gamestonk_terminal/discovery/fidelity_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gamestonk_terminal/discovery/fidelity_api.py b/gamestonk_terminal/discovery/fidelity_api.py index 986f9d92cb4..e1d8a9bd78c 100644 --- a/gamestonk_terminal/discovery/fidelity_api.py +++ b/gamestonk_terminal/discovery/fidelity_api.py @@ -56,7 +56,10 @@ def orders(l_args): ): if ((idx + 1) % 3 == 0) or ((idx + 1) % 4 == 0) or ((idx + 1) % 6 == 0): - l_orders_vals.append(an_order.contents[1]) + if len(an_order) == 0: + l_orders_vals.append("") + else: + l_orders_vals.append(an_order.contents[1]) elif (idx + 1) % 5 == 0: s_orders = str(an_order) l_orders_vals.append(