use get to return None on trade with no liq price

This commit is contained in:
Stefano
2025-11-22 16:52:43 +09:00
parent 2f392b483c
commit 18f73af6e6

View File

@@ -837,7 +837,7 @@ class Telegram(RPCHandler):
# Adding liquidation only if it is not None # Adding liquidation only if it is not None
lines.append( lines.append(
f"*Liquidation:* `{round_value(r['liquidation_price'], 8)}`" f"*Liquidation:* `{round_value(r['liquidation_price'], 8)}`"
if r["liquidation_price"] if r.get("liquidation_price")
else "" else ""
) )
# Adding stoploss and stoploss percentage only if it is not None # Adding stoploss and stoploss percentage only if it is not None