Explorar el Código

Added assigned_object_type in prefetch for api view IPAddressViewSet - fixes #15845

Mattias Loverot hace 1 año
padre
commit
851b4cc4d3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/ipam/api/views.py

+ 1 - 1
netbox/ipam/api/views.py

@@ -119,7 +119,7 @@ class IPRangeViewSet(NetBoxModelViewSet):
 
 class IPAddressViewSet(NetBoxModelViewSet):
     queryset = IPAddress.objects.prefetch_related(
-        'vrf__tenant', 'tenant', 'nat_inside', 'nat_outside', 'tags', 'assigned_object'
+        'vrf__tenant', 'tenant', 'nat_inside', 'nat_outside', 'tags', 'assigned_object', 'assigned_object_type'
     )
     serializer_class = serializers.IPAddressSerializer
     filterset_class = filtersets.IPAddressFilterSet