Skip to content

Commit 92c4966

Browse files
arthansonjeremystretch
authored andcommitted
12548 add prefetch_related for l2vpn and vdcs to interface api
1 parent 2204735 commit 92c4966

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

netbox/dcim/api/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,8 @@ class PowerOutletViewSet(PathEndpointMixin, NetBoxModelViewSet):
493493
class InterfaceViewSet(PathEndpointMixin, NetBoxModelViewSet):
494494
queryset = Interface.objects.prefetch_related(
495495
'device', 'module__module_bay', 'parent', 'bridge', 'lag', '_path', 'cable__terminations', 'wireless_lans',
496-
'untagged_vlan', 'tagged_vlans', 'vrf', 'ip_addresses', 'fhrp_group_assignments', 'tags'
496+
'untagged_vlan', 'tagged_vlans', 'vrf', 'ip_addresses', 'fhrp_group_assignments', 'tags', 'l2vpn_terminations',
497+
'vdcs',
497498
)
498499
serializer_class = serializers.InterfaceSerializer
499500
filterset_class = filtersets.InterfaceFilterSet

0 commit comments

Comments
 (0)