From e66974ef4eb88f8791ad2ddbe2ab72abc9b645d5 Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 17 Nov 2022 16:45:20 -0800 Subject: [PATCH] 10236 optimize with statement --- netbox/templates/dcim/device.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index a1e87c2a8..19e7e6e3c 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -248,8 +248,8 @@ {{ leg.outlet_count }} {{ leg.allocated }} {% if powerfeed.available_power %} - {{ powerfeed.available_power|divide:3 }}VA {% with phase_available=powerfeed.available_power|divide:3 %} + {{ phase_available }}VA {% utilization_graph leg.allocated|percentage:phase_available %} {% endwith %} {% else %}