From 57e089efd3b08f49e85be288a597919f92948f1e Mon Sep 17 00:00:00 2001 From: gcarq Date: Tue, 7 Nov 2017 17:39:57 +0100 Subject: [PATCH] fix NoneType issue in status command handle --- freqtrade/rpc/telegram.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 9a0a478f3..e964e68e7 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -129,7 +129,9 @@ def _status(bot: Bot, update: Update) -> None: send_msg('*Status:* `no active trade`', bot=bot) else: for trade in trades: - order = exchange.get_order(trade.open_order_id) + order = None + if trade.open_order_id: + order = exchange.get_order(trade.open_order_id) # calculate profit and send message to user current_rate = exchange.get_ticker(trade.pair)['bid'] current_profit = trade.calc_profit(current_rate)