From be03055547d0083f57742c48e9f996157258c398 Mon Sep 17 00:00:00 2001 From: phith0n Date: Tue, 21 Jun 2022 23:46:14 +0800 Subject: [PATCH 1/2] added list_select_related to reduce duplicate SQL queries in admin UI --- oauth2_provider/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/oauth2_provider/admin.py b/oauth2_provider/admin.py index cf41ec5b2..cefc75bb6 100644 --- a/oauth2_provider/admin.py +++ b/oauth2_provider/admin.py @@ -48,6 +48,7 @@ class IDTokenAdmin(admin.ModelAdmin): raw_id_fields = ("user",) search_fields = ("user__email",) if has_email else () list_filter = ("application",) + list_select_related = ("application", "user") class RefreshTokenAdmin(admin.ModelAdmin): From 5e8963fa4c0d5ae0e2918201de0338e6bc48ee88 Mon Sep 17 00:00:00 2001 From: phith0n Date: Tue, 21 Jun 2022 23:52:26 +0800 Subject: [PATCH 2/2] added author name in contributors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 0c46746e7..fa0b642e0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -79,3 +79,4 @@ Dominik George David Hill Darrel O'Pry Jordi Sanchez +Owen Gong