From 72f61f4682e926a33018e6767b005a1bd78236c6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 27 Oct 2020 10:08:24 +0100 Subject: [PATCH] Remove optional, now is not optional --- freqtrade/persistence/models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index 3c62a7268..7e6d967c1 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -684,15 +684,12 @@ class PairLock(_DECL_BASE): f'lock_end_time={lock_end_time})') @staticmethod - def query_pair_locks(pair: Optional[str], now: Optional[datetime] = None) -> Query: + def query_pair_locks(pair: Optional[str], now: datetime) -> Query: """ Get all locks for this pair :param pair: Pair to check for. Returns all current locks if pair is empty :param now: Datetime object (generated via datetime.now(timezone.utc)). - defaults to datetime.utcnow() """ - if not now: - now = datetime.now(timezone.utc) filters = [PairLock.lock_end_time > now, # Only active locks