1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #6312: Interface device filter should return all virtual chassis interfaces only if device is master

This commit is contained in:
jeremystretch
2021-05-07 09:47:32 -04:00
parent d6a0cbb1a0
commit e9b21aaf86
4 changed files with 8 additions and 9 deletions

View File

@@ -2153,7 +2153,7 @@ class DeviceForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
ip_choices = [(None, '---------')]
# Gather PKs of all interfaces belonging to this Device or a peer VirtualChassis member
interface_ids = self.instance.vc_interfaces().values_list('pk', flat=True)
interface_ids = self.instance.vc_interfaces(if_master=False).values_list('pk', flat=True)
# Collect interface IPs
interface_ips = IPAddress.objects.filter(