Skip to content

Commit

Permalink
Add select related to limit queries
Browse files Browse the repository at this point in the history
  • Loading branch information
hipek8 committed Nov 20, 2024
1 parent 47b16e8 commit 6c0e20a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ralph/assets/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def get_queryset(self):
return (
self.queryset.dc_hosts()
.select_related(*self.select_related)
.polymorphic_select_related(Cluster=['type'])
.polymorphic_select_related(Cluster=['type'], CloudHost=['hypervisor'])
.polymorphic_prefetch_related(
Cluster=[*self.prefetch_related],
DataCenterAsset=[*self.prefetch_related],
Expand Down

0 comments on commit 6c0e20a

Please sign in to comment.