From 5dc6b7ab230818c146e194c36c08506509eb83ae Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Wed, 19 Nov 2025 22:59:12 +0100 Subject: [PATCH] fix(forms): Remove unused `airflow` from RackType UI RackType has no `airflow` field. Yet the Rack Types table exposed an "Airflow" column and the detail view template attempted to render it. The FilterForm correctly omits the field because it's not in the FilterSet. Remove the "Airflow" column from the RackType table config and drop the `airflow` row from the RackType detail template. Fixes #20840 --- netbox/dcim/forms/filtersets.py | 10 +++++----- netbox/dcim/tables/racks.py | 2 +- netbox/templates/dcim/racktype.html | 4 ---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/netbox/dcim/forms/filtersets.py b/netbox/dcim/forms/filtersets.py index 12bd06907c5..decd7f737dc 100644 --- a/netbox/dcim/forms/filtersets.py +++ b/netbox/dcim/forms/filtersets.py @@ -278,11 +278,6 @@ class RackBaseFilterForm(NetBoxModelFilterSetForm): choices=BOOLEAN_WITH_BLANK_CHOICES ) ) - airflow = forms.MultipleChoiceField( - label=_('Airflow'), - choices=add_blank_choice(RackAirflowChoices), - required=False - ) weight = forms.DecimalField( label=_('Weight'), required=False, @@ -381,6 +376,11 @@ class RackFilterForm(TenancyFilterForm, ContactModelFilterForm, RackBaseFilterFo }, label=_('Rack type') ) + airflow = forms.MultipleChoiceField( + label=_('Airflow'), + choices=add_blank_choice(RackAirflowChoices), + required=False + ) serial = forms.CharField( label=_('Serial'), required=False diff --git a/netbox/dcim/tables/racks.py b/netbox/dcim/tables/racks.py index afb2c44c880..7cac619cd53 100644 --- a/netbox/dcim/tables/racks.py +++ b/netbox/dcim/tables/racks.py @@ -100,7 +100,7 @@ class Meta(NetBoxTable.Meta): model = RackType fields = ( 'pk', 'id', 'model', 'manufacturer', 'form_factor', 'u_height', 'starting_unit', 'width', 'outer_width', - 'outer_height', 'outer_depth', 'mounting_depth', 'airflow', 'weight', 'max_weight', 'description', + 'outer_height', 'outer_depth', 'mounting_depth', 'weight', 'max_weight', 'description', 'comments', 'instance_count', 'tags', 'created', 'last_updated', ) default_columns = ( diff --git a/netbox/templates/dcim/racktype.html b/netbox/templates/dcim/racktype.html index cfeba02fea9..f3919cd344a 100644 --- a/netbox/templates/dcim/racktype.html +++ b/netbox/templates/dcim/racktype.html @@ -24,10 +24,6 @@

{% trans "Rack Type" %}

{% trans "Description" %} {{ object.description|placeholder }} - - {% trans "Airflow" %} - {{ object.get_airflow_display|placeholder }} - {% include 'dcim/inc/panels/racktype_dimensions.html' %}