Skip to content

Commit

Permalink
Optimize db queries count
Browse files Browse the repository at this point in the history
  • Loading branch information
awieckowski committed Feb 9, 2024
1 parent 6db0270 commit 467a389
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ralph/data_center/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ def get_queryset(self, request):
qs = qs.select_related('property_of')
return qs

def get_export_queryset(self, request):
qs = super().get_export_queryset(request)
qs = qs.select_related('property_of')
return qs

def get_multiadd_fields(self, obj=None):
multiadd_fields = [
{'field': 'sn', 'allow_duplicates': False},
Expand Down

0 comments on commit 467a389

Please sign in to comment.