From f4ae8fbc5ffd3c8e0436f315f81904f8523e19a2 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 14 Feb 2023 07:20:47 +0000 Subject: [PATCH] Check equality with None instead of truthfulness --- core/trading/market.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/trading/market.py b/core/trading/market.py index 18547c1..c87cfc6 100644 --- a/core/trading/market.py +++ b/core/trading/market.py @@ -311,9 +311,9 @@ def execute_strategy(callback, strategy, func): # Get the precision for the symbol trade_precision, display_precision = get_precision(account, symbol) - if not trade_precision or not display_precision: + if trade_precision is None or display_precision is None: # sendmsg(user, f"Precision not found for {symbol}", title="Error") - # log.error(f"Precision not found for {symbol}") + log.error(f"Market precision not found for {symbol} from {account}") return # Round the received price to the display precision