Skip to content

Commit b94f69e

Browse files
authored
Added list_select_related to reduce duplicate SQL queries in admin UI (#1177)
* added list_select_related to reduce duplicate SQL queries in admin UI * added author name in contributors
1 parent 007a5c4 commit b94f69e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

‎AUTHORS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ Dominik George
7979
David Hill
8080
Darrel O'Pry
8181
Jordi Sanchez
82+
Owen Gong

‎oauth2_provider/admin.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class IDTokenAdmin(admin.ModelAdmin):
4848
raw_id_fields= ("user",)
4949
search_fields= ("user__email",) ifhas_emailelse ()
5050
list_filter= ("application",)
51+
list_select_related= ("application", "user")
5152

5253

5354
classRefreshTokenAdmin(admin.ModelAdmin):

0 commit comments

Comments
(0)