mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #3574 - Change device
to parent
in interface edit form vlan filtering logic
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
v2.6.6 (FUTURE)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
* [#3574](https://github.com/netbox-community/netbox/issues/3574) - Change `device` to `parent` in interface editing vlan filtering logic
|
||||
|
||||
## Enhancements
|
||||
|
||||
* [#3259](https://github.com/netbox-community/netbox/issues/3259) - Add `rack` and `site` filters for cables
|
||||
|
@ -2215,7 +2215,7 @@ class InterfaceForm(InterfaceCommonForm, BootstrapMixin, forms.ModelForm):
|
||||
(group.name, [(vlan.pk, vlan) for vlan in global_group_vlans])
|
||||
)
|
||||
|
||||
site = getattr(self.instance.device, 'site', None)
|
||||
site = getattr(self.instance.parent, 'site', None)
|
||||
if site is not None:
|
||||
|
||||
# Add non-grouped site VLANs
|
||||
|
@ -670,7 +670,7 @@ class InterfaceForm(BootstrapMixin, forms.ModelForm):
|
||||
(group.name, [(vlan.pk, vlan) for vlan in global_group_vlans])
|
||||
)
|
||||
|
||||
site = getattr(self.instance.device, 'site', None)
|
||||
site = getattr(self.instance.parent, 'site', None)
|
||||
if site is not None:
|
||||
|
||||
# Add non-grouped site VLANs
|
||||
|
Reference in New Issue
Block a user