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

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

This commit is contained in:
Mattias Loverot
2024-04-29 16:33:05 +02:00
committed by Jeremy Stretch
parent 85db007ff5
commit 851b4cc4d3

View File

@ -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