mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 01:06:11 -06:00
Closes #11619: Allow VLANs without a site during multi-port edits
This commit allows users to be able to select VLANs without a site assignment during bulk interfaces edits under Devices > DEVICE COMPONENTS > Interfaces. Prior to this commit, only VLANs that were assigned the same site as the device were available for selection.
This commit is contained in:
parent
c8d9a3b4eb
commit
9a159dbdcd
@ -1292,8 +1292,9 @@ class InterfaceBulkEditForm(
|
||||
break
|
||||
|
||||
if site is not None:
|
||||
self.fields['untagged_vlan'].widget.add_query_param('site_id', site.pk)
|
||||
self.fields['tagged_vlans'].widget.add_query_param('site_id', site.pk)
|
||||
# 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['tagged_vlans'].widget.add_query_param('site_id', [site.pk, 'null'])
|
||||
|
||||
self.fields['parent'].choices = ()
|
||||
self.fields['parent'].widget.attrs['disabled'] = True
|
||||
|
Loading…
Reference in New Issue
Block a user