From 92cdf420bbb06c9097cb16a0d531daae08bcb8f3 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Wed, 8 Nov 2023 23:15:22 +0530 Subject: [PATCH] review changes #13587 --- netbox/dcim/tables/devices.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index 6467f373bf5..ac99c93bbd3 100644 --- a/netbox/dcim/tables/devices.py +++ b/netbox/dcim/tables/devices.py @@ -466,12 +466,12 @@ class PowerPortTable(ModularDeviceComponentTable, PathEndpointTable): 'args': [Accessor('device_id')], } ) - maximum_draw = tables.TemplateColumn( - template_code='''{% if record.maximum_draw %}{{ record.maximum_draw }} W{% else %}—{% endif %}''', + maximum_draw = columns.TemplateColumn( + template_code='''{% if record.maximum_draw %}{{ value }} W{% endif %}''', verbose_name=_('Maximum draw') ) - allocated_draw = tables.TemplateColumn( - template_code='''{% if record.allocated_draw %}{{ record.allocated_draw }} W{% else %}—{% endif %}''', + allocated_draw = columns.TemplateColumn( + template_code='''{% if record.allocated_draw %}{{ value }} W{% endif %}''', verbose_name=_('Allocated draw') ) tags = columns.TagColumn(