mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-31 14:43:36 +02:00
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.
This commit is contained in:
@@ -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)',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -807,8 +807,8 @@ class Interface(
|
|||||||
verbose_name=_('wireless channel')
|
verbose_name=_('wireless channel')
|
||||||
)
|
)
|
||||||
rf_channel_frequency = models.DecimalField(
|
rf_channel_frequency = models.DecimalField(
|
||||||
max_digits=7,
|
max_digits=8,
|
||||||
decimal_places=2,
|
decimal_places=3,
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
verbose_name=_('channel frequency (MHz)'),
|
verbose_name=_('channel frequency (MHz)'),
|
||||||
|
|||||||
Reference in New Issue
Block a user