mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Replace 'null' with FILTERS_NULL_CHOICE_VALUE constant
This commit is contained in:
parent
9a159dbdcd
commit
17d68c4390
@ -1,4 +1,5 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
|
from django.conf import settings
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
from timezone_field import TimeZoneFormField
|
from timezone_field import TimeZoneFormField
|
||||||
@ -1293,8 +1294,12 @@ class InterfaceBulkEditForm(
|
|||||||
|
|
||||||
if site is not None:
|
if site is not None:
|
||||||
# Query for VLANs assigned to the same site and VLANs with no site assigned (null).
|
# Query for VLANs assigned to the same site and VLANs with no site assigned (null).
|
||||||
self.fields['untagged_vlan'].widget.add_query_param('site_id', [site.pk, 'null'])
|
self.fields['untagged_vlan'].widget.add_query_param(
|
||||||
self.fields['tagged_vlans'].widget.add_query_param('site_id', [site.pk, 'null'])
|
'site_id', [site.pk, settings.FILTERS_NULL_CHOICE_VALUE]
|
||||||
|
)
|
||||||
|
self.fields['tagged_vlans'].widget.add_query_param(
|
||||||
|
'site_id', [site.pk, settings.FILTERS_NULL_CHOICE_VALUE]
|
||||||
|
)
|
||||||
|
|
||||||
self.fields['parent'].choices = ()
|
self.fields['parent'].choices = ()
|
||||||
self.fields['parent'].widget.attrs['disabled'] = True
|
self.fields['parent'].widget.attrs['disabled'] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user