Просмотр исходного кода

12548 add prefetch_related for l2vpn and vdcs to interface api

Arthur 2 лет назад
Родитель
Сommit
92c49669f9
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      netbox/dcim/api/views.py

+ 2 - 1
netbox/dcim/api/views.py

@@ -493,7 +493,8 @@ class PowerOutletViewSet(PathEndpointMixin, NetBoxModelViewSet):
 class InterfaceViewSet(PathEndpointMixin, NetBoxModelViewSet):
     queryset = Interface.objects.prefetch_related(
         'device', 'module__module_bay', 'parent', 'bridge', 'lag', '_path', 'cable__terminations', 'wireless_lans',
-        'untagged_vlan', 'tagged_vlans', 'vrf', 'ip_addresses', 'fhrp_group_assignments', 'tags'
+        'untagged_vlan', 'tagged_vlans', 'vrf', 'ip_addresses', 'fhrp_group_assignments', 'tags', 'l2vpn_terminations',
+        'vdcs',
     )
     serializer_class = serializers.InterfaceSerializer
     filterset_class = filtersets.InterfaceFilterSet