From 6f4649c7784a06597f07ec48a37a3872b46e5df7 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sat, 14 Feb 2026 20:19:52 +0100 Subject: [PATCH] 14.02.26 --- modules/purchase_trade/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/purchase_trade/dashboard.py b/modules/purchase_trade/dashboard.py index fba9705..3afdcb5 100755 --- a/modules/purchase_trade/dashboard.py +++ b/modules/purchase_trade/dashboard.py @@ -293,7 +293,7 @@ class Dashboard(ModelSQL, ModelView): last_total,last_variation = Valuation.get_totals() pnl_amount = "{:,.0f}".format(round(last_total,0)) pnl_variation = 0 - if last_total: + if last_total and last_variation: pnl_variation = "{:,.2f}".format(round((last_variation/last_total)*100,0)) Open = Pool().get('open.position') opens = Open.search(['id','>',0])