Simplify query in freqtradebot

This commit is contained in:
Matthias 2022-06-09 07:04:46 +02:00
parent 6a7ffd5483
commit c550cd8b0d

View File

@ -227,7 +227,7 @@ class FreqtradeBot(LoggingMixin):
Notify the user when the bot is stopped (not reloaded) Notify the user when the bot is stopped (not reloaded)
and there are still open trades active. and there are still open trades active.
""" """
open_trades = Trade.get_trades([Trade.is_open.is_(True)]).all() open_trades = Trade.get_open_trades()
if len(open_trades) != 0 and self.state != State.RELOAD_CONFIG: if len(open_trades) != 0 and self.state != State.RELOAD_CONFIG:
msg = { msg = {