Skip to content

Commit

Permalink
Added list_select_related to reduce duplicate SQL queries in admin UI (
Browse files Browse the repository at this point in the history
…#1177)

* added list_select_related to reduce duplicate SQL queries in admin UI

* added author name in contributors
  • Loading branch information
phith0n committed Jun 21, 2022
1 parent 007a5c4 commit b94f69e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ Dominik George
David Hill
Darrel O'Pry
Jordi Sanchez
Owen Gong
1 change: 1 addition & 0 deletions oauth2_provider/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b94f69e

Please sign in to comment.