1
0
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:
dansheps
2019-10-07 08:54:39 -05:00
parent a3b9bdaff1
commit 04d9889127
3 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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