mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-26 03:11:49 +01:00
* Fixes #19415: Increased Circuit/WirelessLink absolute distance upper limit Also adds form validation that provides a useful message to the user rather than a 500 error with potentially little information. * Include forgotten migration files * Remove unnecessary comments * Remove more unnecessary comments * Addresses PR feedback * Gah, remove django migration header comment * Clean up new has_field_errors mechanism, fix issue with ObjectAttribute * Address PR feedback, revert changes to render_fieldset template tag
This commit is contained in:
@@ -7,6 +7,7 @@ from ipam.models import VLAN
|
||||
from netbox.forms import NetBoxModelForm
|
||||
from tenancy.forms import TenancyForm
|
||||
from utilities.forms.fields import CommentField, DynamicModelChoiceField, SlugField
|
||||
from utilities.forms.mixins import DistanceValidationMixin
|
||||
from utilities.forms.rendering import FieldSet, InlineFields
|
||||
from wireless.models import *
|
||||
|
||||
@@ -73,7 +74,7 @@ class WirelessLANForm(ScopedForm, TenancyForm, NetBoxModelForm):
|
||||
}
|
||||
|
||||
|
||||
class WirelessLinkForm(TenancyForm, NetBoxModelForm):
|
||||
class WirelessLinkForm(DistanceValidationMixin, TenancyForm, NetBoxModelForm):
|
||||
site_a = DynamicModelChoiceField(
|
||||
queryset=Site.objects.all(),
|
||||
required=False,
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wireless', '0014_wirelesslangroup_comments'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='wirelesslink',
|
||||
name='_abs_distance',
|
||||
field=models.DecimalField(blank=True, decimal_places=4, max_digits=13, null=True),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user