Skip to content

Commit

Permalink
Fixes #3574 - Change device to parent in interface edit form vlan…
Browse files Browse the repository at this point in the history
… filtering logic
  • Loading branch information
DanSheps committed Oct 7, 2019
1 parent a3b9bda commit 04d9889
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,7 @@ def __init__(self, *args, **kwargs):
(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
Expand Down
2 changes: 1 addition & 1 deletion netbox/virtualization/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def __init__(self, *args, **kwargs):
(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
Expand Down

0 comments on commit 04d9889

Please sign in to comment.