From b19477106ee193364abba5bac873015d959e633a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Wed, 28 Oct 2015 09:59:16 +0200 Subject: [PATCH] Avoid N queries in Pings admin list view --- hc/api/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hc/api/admin.py b/hc/api/admin.py index 2ed84e53..198fb336 100644 --- a/hc/api/admin.py +++ b/hc/api/admin.py @@ -49,7 +49,7 @@ class ChecksAdmin(admin.ModelAdmin): @admin.register(Ping) class PingsAdmin(admin.ModelAdmin): search_fields = ("owner__name", "owner__code", "owner__user__email") - list_select_related = ("owner", ) + list_select_related = ("owner", "owner__user") list_display = ("id", "created", "check_name", "email", "scheme", "method", "ua") list_filter = ("created", "scheme", "method")