From 6eb2e51bfc86400305f43e6d10af49dfe201ff32 Mon Sep 17 00:00:00 2001 From: Kavinkumar <33546454+mkavinkumar1@users.noreply.github.com> Date: Sat, 19 Mar 2022 17:57:04 +0530 Subject: [PATCH] removed assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: மனோஜ்குமார் பழனிச்சாமி --- freqtrade/freqtradebot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 5a60419cf..f4a61bacf 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1270,10 +1270,9 @@ class FreqtradeBot(LoggingMixin): # Use cached rates here - it was updated seconds ago. current_rate = self.exchange.get_rate( trade.pair, refresh=False, side="sell") if not fill else None - if sub_trade: - # for mypy only; order will always be passed during sub trade - assert order is not None + # second condtion is for mypy only; order will always be passed during sub trade + if sub_trade and order is not None: amount = order.safe_filled profit_rate = order.safe_price