From 2b0d2070d0b1b7428ec12f433abe1d213e1a884d Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 18 Feb 2021 12:49:14 +0100 Subject: [PATCH] Avoid crash with /delete When a trade is deleted between querying the database and actually handling the trade. closes #4326 --- freqtrade/freqtradebot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 73707e4ec..d546dd6d2 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -179,6 +179,7 @@ class FreqtradeBot(LoggingMixin): # Without this, freqtrade my try to recreate stoploss_on_exchange orders # while selling is in process, since telegram messages arrive in an different thread. with self._sell_lock: + trades = Trade.get_open_trades() # First process current opened trades (positions) self.exit_positions(trades)