From 808cefe526aed74f355d2a7c4ed8b55e6fe96eb0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 5 Feb 2022 10:12:03 +0100 Subject: [PATCH] Update order_selection logic --- freqtrade/persistence/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index 2e0f0753a..dfa98d97f 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -650,9 +650,9 @@ class LocalTrade(): Finds order object by Order id. :param order_id: Exchange order id """ - orders = [o for o in self.orders if o.order_id == order_id] - if orders: - return orders[0] + for o in self.orders: + if o.order_id == order_id: + return o return None def select_order(