mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
added l2vpn to vlan filterset
This commit is contained in:
parent
59d03a11c5
commit
53d07977c3
@ -852,15 +852,15 @@ class VLANFilterSet(NetBoxModelFilterSet, TenancyFilterSet):
|
|||||||
queryset=VirtualMachine.objects.all(),
|
queryset=VirtualMachine.objects.all(),
|
||||||
method='get_for_virtualmachine'
|
method='get_for_virtualmachine'
|
||||||
)
|
)
|
||||||
l2vpn_termination = django_filters.ModelMultipleChoiceFilter(
|
l2vpn = django_filters.ModelMultipleChoiceFilter(
|
||||||
field_name='l2vpn_terminations',
|
field_name='l2vpn_terminations__l2vpn',
|
||||||
queryset=L2VPNTermination.objects.all(),
|
queryset=L2VPN.objects.all(),
|
||||||
label=_('L2VPN termination (ID)'),
|
label=_('L2VPN (ID)'),
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = VLAN
|
model = VLAN
|
||||||
fields = ['id', 'vid', 'name', 'description', 'l2vpn_termination']
|
fields = ['id', 'vid', 'name', 'description', 'l2vpn']
|
||||||
|
|
||||||
def search(self, queryset, name, value):
|
def search(self, queryset, name, value):
|
||||||
if not value.strip():
|
if not value.strip():
|
||||||
|
Loading…
Reference in New Issue
Block a user