From f303ae2cd76b9507dce313dd929df218ed97d70f Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Tue, 24 Mar 2026 09:36:20 -0700 Subject: [PATCH] Closes #21662: Increase rf_channel_frequency Precision (#21690) Increase `rf_channel_frequency` precision from two to three decimal places. Update the field definition and migration to use `max_digits=8` and `decimal_places=3`, preserving support for higher channel frequencies while allowing more precise values to be stored. --- ...nterface_rf_channel_frequency_precision.py | 23 +++++++++++++++++++ netbox/dcim/models/device_components.py | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 netbox/dcim/migrations/0229_interface_rf_channel_frequency_precision.py diff --git a/netbox/dcim/migrations/0229_interface_rf_channel_frequency_precision.py b/netbox/dcim/migrations/0229_interface_rf_channel_frequency_precision.py new file mode 100644 index 000000000..657c308fc --- /dev/null +++ b/netbox/dcim/migrations/0229_interface_rf_channel_frequency_precision.py @@ -0,0 +1,23 @@ +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dcim', '0228_cable_bundle'), + ] + + operations = [ + migrations.AlterField( + model_name='interface', + name='rf_channel_frequency', + field=models.DecimalField( + blank=True, + decimal_places=3, + help_text='Populated by selected channel (if set)', + max_digits=8, + null=True, + verbose_name='channel frequency (MHz)', + ), + ), + ] diff --git a/netbox/dcim/models/device_components.py b/netbox/dcim/models/device_components.py index 09dc02ae9..77db3194e 100644 --- a/netbox/dcim/models/device_components.py +++ b/netbox/dcim/models/device_components.py @@ -807,8 +807,8 @@ class Interface( verbose_name=_('wireless channel') ) rf_channel_frequency = models.DecimalField( - max_digits=7, - decimal_places=2, + max_digits=8, + decimal_places=3, blank=True, null=True, verbose_name=_('channel frequency (MHz)'),