Skip to content

Commit

Permalink
Added assigned_object_type in prefetch for api view IPAddressViewSet -
Browse files Browse the repository at this point in the history
…fixes #15845
  • Loading branch information
mulmat authored and jeremystretch committed Apr 29, 2024
1 parent 85db007 commit 851b4cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/ipam/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 851b4cc

Please sign in to comment.