diff --git a/CHANGELOG.md b/CHANGELOG.md index 99f858396..221bf3e35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 6654f677f..887e3f908 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -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 diff --git a/netbox/virtualization/forms.py b/netbox/virtualization/forms.py index c8bf7c155..2cf55fcde 100644 --- a/netbox/virtualization/forms.py +++ b/netbox/virtualization/forms.py @@ -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