From 851b4cc4d3f49358b48c1d1e7b6bc2a51aa84473 Mon Sep 17 00:00:00 2001 From: Mattias Loverot Date: Mon, 29 Apr 2024 16:33:05 +0200 Subject: [PATCH] Added assigned_object_type in prefetch for api view IPAddressViewSet - fixes #15845 --- netbox/ipam/api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/ipam/api/views.py b/netbox/ipam/api/views.py index 62e2b9eca92..c5a9331ab6d 100644 --- a/netbox/ipam/api/views.py +++ b/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